aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/bookmark/BookmarkFileServiceTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bookmark/BookmarkFileServiceTest.php')
-rw-r--r--tests/bookmark/BookmarkFileServiceTest.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php
index a91f374f..a4ec1013 100644
--- a/tests/bookmark/BookmarkFileServiceTest.php
+++ b/tests/bookmark/BookmarkFileServiceTest.php
@@ -1066,6 +1066,36 @@ class BookmarkFileServiceTest extends TestCase
1066 } 1066 }
1067 1067
1068 /** 1068 /**
1069 * Test filterDay while logged in
1070 */
1071 public function testFilterDayLoggedIn(): void
1072 {
1073 $bookmarks = $this->privateLinkDB->filterDay('20121206');
1074 $expectedIds = [4, 9, 1, 0];
1075
1076 static::assertCount(4, $bookmarks);
1077 foreach ($bookmarks as $bookmark) {
1078 $i = ($i ?? -1) + 1;
1079 static::assertSame($expectedIds[$i], $bookmark->getId());
1080 }
1081 }
1082
1083 /**
1084 * Test filterDay while logged out
1085 */
1086 public function testFilterDayLoggedOut(): void
1087 {
1088 $bookmarks = $this->publicLinkDB->filterDay('20121206');
1089 $expectedIds = [4, 9, 1];
1090
1091 static::assertCount(3, $bookmarks);
1092 foreach ($bookmarks as $bookmark) {
1093 $i = ($i ?? -1) + 1;
1094 static::assertSame($expectedIds[$i], $bookmark->getId());
1095 }
1096 }
1097
1098 /**
1069 * Allows to test LinkDB's private methods 1099 * Allows to test LinkDB's private methods
1070 * 1100 *
1071 * @see 1101 * @see