diff options
author | ArthurHoaro <arthur@hoa.ro> | 2021-02-04 10:57:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 10:57:44 +0100 |
commit | 8997ae6c8e24286f7d47981eaf905e80d2481c10 (patch) | |
tree | 9906b122998ca4420af68b1bb110033b99f7d8bf /tests/front/controller/admin/ManageTagControllerTest.php | |
parent | 11edc143b42a7be09c0c9dc02730c83e8cbb73c2 (diff) | |
parent | 9b8c0a4560fa1d87cab1529099b1b4677e92e265 (diff) | |
download | Shaarli-8997ae6c8e24286f7d47981eaf905e80d2481c10.tar.gz Shaarli-8997ae6c8e24286f7d47981eaf905e80d2481c10.tar.zst Shaarli-8997ae6c8e24286f7d47981eaf905e80d2481c10.zip |
Merge pull request #1697 from ArthurHoaro/feature/pagination
Handle pagination through BookmarkService
Diffstat (limited to 'tests/front/controller/admin/ManageTagControllerTest.php')
-rw-r--r-- | tests/front/controller/admin/ManageTagControllerTest.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/front/controller/admin/ManageTagControllerTest.php b/tests/front/controller/admin/ManageTagControllerTest.php index af6f273f..56a64cbb 100644 --- a/tests/front/controller/admin/ManageTagControllerTest.php +++ b/tests/front/controller/admin/ManageTagControllerTest.php | |||
@@ -6,6 +6,7 @@ namespace Shaarli\Front\Controller\Admin; | |||
6 | 6 | ||
7 | use Shaarli\Bookmark\Bookmark; | 7 | use Shaarli\Bookmark\Bookmark; |
8 | use Shaarli\Bookmark\BookmarkFilter; | 8 | use Shaarli\Bookmark\BookmarkFilter; |
9 | use Shaarli\Bookmark\SearchResult; | ||
9 | use Shaarli\Config\ConfigManager; | 10 | use Shaarli\Config\ConfigManager; |
10 | use Shaarli\Front\Exception\WrongTokenException; | 11 | use Shaarli\Front\Exception\WrongTokenException; |
11 | use Shaarli\Security\SessionManager; | 12 | use Shaarli\Security\SessionManager; |
@@ -100,11 +101,11 @@ class ManageTagControllerTest extends TestCase | |||
100 | ->expects(static::once()) | 101 | ->expects(static::once()) |
101 | ->method('search') | 102 | ->method('search') |
102 | ->with(['searchtags' => 'old-tag'], BookmarkFilter::$ALL, true) | 103 | ->with(['searchtags' => 'old-tag'], BookmarkFilter::$ALL, true) |
103 | ->willReturnCallback(function () use ($bookmark1, $bookmark2): array { | 104 | ->willReturnCallback(function () use ($bookmark1, $bookmark2): SearchResult { |
104 | $bookmark1->expects(static::once())->method('renameTag')->with('old-tag', 'new-tag'); | 105 | $bookmark1->expects(static::once())->method('renameTag')->with('old-tag', 'new-tag'); |
105 | $bookmark2->expects(static::once())->method('renameTag')->with('old-tag', 'new-tag'); | 106 | $bookmark2->expects(static::once())->method('renameTag')->with('old-tag', 'new-tag'); |
106 | 107 | ||
107 | return [$bookmark1, $bookmark2]; | 108 | return SearchResult::getSearchResult([$bookmark1, $bookmark2]); |
108 | }) | 109 | }) |
109 | ; | 110 | ; |
110 | $this->container->bookmarkService | 111 | $this->container->bookmarkService |
@@ -153,11 +154,11 @@ class ManageTagControllerTest extends TestCase | |||
153 | ->expects(static::once()) | 154 | ->expects(static::once()) |
154 | ->method('search') | 155 | ->method('search') |
155 | ->with(['searchtags' => 'old-tag'], BookmarkFilter::$ALL, true) | 156 | ->with(['searchtags' => 'old-tag'], BookmarkFilter::$ALL, true) |
156 | ->willReturnCallback(function () use ($bookmark1, $bookmark2): array { | 157 | ->willReturnCallback(function () use ($bookmark1, $bookmark2): SearchResult { |
157 | $bookmark1->expects(static::once())->method('deleteTag')->with('old-tag'); | 158 | $bookmark1->expects(static::once())->method('deleteTag')->with('old-tag'); |
158 | $bookmark2->expects(static::once())->method('deleteTag')->with('old-tag'); | 159 | $bookmark2->expects(static::once())->method('deleteTag')->with('old-tag'); |
159 | 160 | ||
160 | return [$bookmark1, $bookmark2]; | 161 | return SearchResult::getSearchResult([$bookmark1, $bookmark2]); |
161 | }) | 162 | }) |
162 | ; | 163 | ; |
163 | $this->container->bookmarkService | 164 | $this->container->bookmarkService |