aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/NetscapeBookmarkUtils/BookmarkImportTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-05-07 16:50:20 +0200
committerArthurHoaro <arthur@hoa.ro>2017-05-07 17:11:22 +0200
commit813849e5216cb87121e0f778a734575be6a36052 (patch)
tree45605ad43e3f751eba51d19f8c6955c3824e8d32 /tests/NetscapeBookmarkUtils/BookmarkImportTest.php
parenta4af59f47103a3f9c903eeddb1e30ab9cb7344f0 (diff)
downloadShaarli-813849e5216cb87121e0f778a734575be6a36052.tar.gz
Shaarli-813849e5216cb87121e0f778a734575be6a36052.tar.zst
Shaarli-813849e5216cb87121e0f778a734575be6a36052.zip
Add history entries for API endpoint
CHANGED: datetime is now store as an object in history store file
Diffstat (limited to 'tests/NetscapeBookmarkUtils/BookmarkImportTest.php')
-rw-r--r--tests/NetscapeBookmarkUtils/BookmarkImportTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php
index f838f259..5fc1d1e8 100644
--- a/tests/NetscapeBookmarkUtils/BookmarkImportTest.php
+++ b/tests/NetscapeBookmarkUtils/BookmarkImportTest.php
@@ -628,7 +628,7 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
628 $this->assertEquals($nbLinks, count($history)); 628 $this->assertEquals($nbLinks, count($history));
629 foreach ($history as $value) { 629 foreach ($history as $value) {
630 $this->assertEquals(History::CREATED, $value['event']); 630 $this->assertEquals(History::CREATED, $value['event']);
631 $this->assertTrue(new DateTime('-5 seconds') < DateTime::createFromFormat(DateTime::ATOM, $value['datetime'])); 631 $this->assertTrue(new DateTime('-5 seconds') < $value['datetime']);
632 $this->assertTrue(is_int($value['id'])); 632 $this->assertTrue(is_int($value['id']));
633 } 633 }
634 634
@@ -638,7 +638,7 @@ class BookmarkImportTest extends PHPUnit_Framework_TestCase
638 $this->assertEquals($nbLinks * 2, count($history)); 638 $this->assertEquals($nbLinks * 2, count($history));
639 for ($i = 0 ; $i < $nbLinks ; $i++) { 639 for ($i = 0 ; $i < $nbLinks ; $i++) {
640 $this->assertEquals(History::UPDATED, $history[$i]['event']); 640 $this->assertEquals(History::UPDATED, $history[$i]['event']);
641 $this->assertTrue(new DateTime('-5 seconds') < DateTime::createFromFormat(DateTime::ATOM, $history[$i]['datetime'])); 641 $this->assertTrue(new DateTime('-5 seconds') < $history[$i]['datetime']);
642 $this->assertTrue(is_int($history[$i]['id'])); 642 $this->assertTrue(is_int($history[$i]['id']));
643 } 643 }
644 } 644 }