aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/bookmark/BookmarkFileServiceTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2021-01-20 14:45:59 +0100
committerArthurHoaro <arthur@hoa.ro>2021-01-20 15:01:29 +0100
commit9b8c0a4560fa1d87cab1529099b1b4677e92e265 (patch)
tree330a9b1a42ff7b7f24a76612b57fae63417ef483 /tests/bookmark/BookmarkFileServiceTest.php
parent055d97f9a9e67d8ee8ae81bbf59a4b846a145d9f (diff)
downloadShaarli-9b8c0a4560fa1d87cab1529099b1b4677e92e265.tar.gz
Shaarli-9b8c0a4560fa1d87cab1529099b1b4677e92e265.tar.zst
Shaarli-9b8c0a4560fa1d87cab1529099b1b4677e92e265.zip
Handle pagination through BookmarkService
Handle all search results through SearchResult object. This is a required step toward implementing a BookmarkService based on SQL database. Related to #953
Diffstat (limited to 'tests/bookmark/BookmarkFileServiceTest.php')
-rw-r--r--tests/bookmark/BookmarkFileServiceTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/bookmark/BookmarkFileServiceTest.php b/tests/bookmark/BookmarkFileServiceTest.php
index f619aff3..d1af3fb0 100644
--- a/tests/bookmark/BookmarkFileServiceTest.php
+++ b/tests/bookmark/BookmarkFileServiceTest.php
@@ -807,7 +807,7 @@ class BookmarkFileServiceTest extends TestCase
807 $request = ['searchtags' => $tags]; 807 $request = ['searchtags' => $tags];
808 $this->assertEquals( 808 $this->assertEquals(
809 2, 809 2,
810 count($this->privateLinkDB->search($request, null, true)) 810 count($this->privateLinkDB->search($request, null, true)->getBookmarks())
811 ); 811 );
812 } 812 }
813 813
@@ -820,7 +820,7 @@ class BookmarkFileServiceTest extends TestCase
820 $request = ['searchtags' => $tags]; 820 $request = ['searchtags' => $tags];
821 $this->assertEquals( 821 $this->assertEquals(
822 2, 822 2,
823 count($this->privateLinkDB->search($request, null, true)) 823 count($this->privateLinkDB->search($request, null, true)->getBookmarks())
824 ); 824 );
825 } 825 }
826 826
@@ -834,12 +834,12 @@ class BookmarkFileServiceTest extends TestCase
834 $request = ['searchtags' => $tags]; 834 $request = ['searchtags' => $tags];
835 $this->assertEquals( 835 $this->assertEquals(
836 1, 836 1,
837 count($this->privateLinkDB->search($request, 'all', true)) 837 count($this->privateLinkDB->search($request, 'all', true)->getBookmarks())
838 ); 838 );
839 839
840 $this->assertEquals( 840 $this->assertEquals(
841 0, 841 0,
842 count($this->publicLinkDB->search($request, 'public', true)) 842 count($this->publicLinkDB->search($request, 'public', true)->getBookmarks())
843 ); 843 );
844 } 844 }
845 845