aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/bookmark/BookmarkFilterTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/bookmark/BookmarkFilterTest.php')
-rw-r--r--tests/bookmark/BookmarkFilterTest.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/bookmark/BookmarkFilterTest.php b/tests/bookmark/BookmarkFilterTest.php
index d4c71cb9..91e139c2 100644
--- a/tests/bookmark/BookmarkFilterTest.php
+++ b/tests/bookmark/BookmarkFilterTest.php
@@ -6,7 +6,6 @@ use Exception;
6use PHPUnit\Framework\TestCase; 6use PHPUnit\Framework\TestCase;
7use ReferenceLinkDB; 7use ReferenceLinkDB;
8use Shaarli\Config\ConfigManager; 8use Shaarli\Config\ConfigManager;
9use Shaarli\Formatter\FormatterFactory;
10use Shaarli\History; 9use Shaarli\History;
11 10
12/** 11/**
@@ -36,7 +35,7 @@ class BookmarkFilterTest extends TestCase
36 /** 35 /**
37 * Instantiate linkFilter with ReferenceLinkDB data. 36 * Instantiate linkFilter with ReferenceLinkDB data.
38 */ 37 */
39 public static function setUpBeforeClass() 38 public static function setUpBeforeClass(): void
40 { 39 {
41 $conf = new ConfigManager('tests/utils/config/configJson'); 40 $conf = new ConfigManager('tests/utils/config/configJson');
42 $conf->set('resource.datastore', self::$testDatastore); 41 $conf->set('resource.datastore', self::$testDatastore);
@@ -190,6 +189,17 @@ class BookmarkFilterTest extends TestCase
190 } 189 }
191 190
192 /** 191 /**
192 * Return bookmarks for a given day
193 */
194 public function testFilterDayRestrictedVisibility(): void
195 {
196 $this->assertEquals(
197 3,
198 count(self::$linkFilter->filter(BookmarkFilter::$FILTER_DAY, '20121206', false, BookmarkFilter::$PUBLIC))
199 );
200 }
201
202 /**
193 * 404 - day not found 203 * 404 - day not found
194 */ 204 */
195 public function testFilterUnknownDay() 205 public function testFilterUnknownDay()