diff options
Diffstat (limited to 'tests/front/controller/visitor/PictureWallControllerTest.php')
-rw-r--r-- | tests/front/controller/visitor/PictureWallControllerTest.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/front/controller/visitor/PictureWallControllerTest.php b/tests/front/controller/visitor/PictureWallControllerTest.php index b868231d..429e99a2 100644 --- a/tests/front/controller/visitor/PictureWallControllerTest.php +++ b/tests/front/controller/visitor/PictureWallControllerTest.php | |||
@@ -5,6 +5,7 @@ declare(strict_types=1); | |||
5 | namespace Shaarli\Front\Controller\Visitor; | 5 | namespace Shaarli\Front\Controller\Visitor; |
6 | 6 | ||
7 | use Shaarli\Bookmark\Bookmark; | 7 | use Shaarli\Bookmark\Bookmark; |
8 | use Shaarli\Bookmark\SearchResult; | ||
8 | use Shaarli\Config\ConfigManager; | 9 | use Shaarli\Config\ConfigManager; |
9 | use Shaarli\Front\Exception\ThumbnailsDisabledException; | 10 | use Shaarli\Front\Exception\ThumbnailsDisabledException; |
10 | use Shaarli\TestCase; | 11 | use Shaarli\TestCase; |
@@ -50,17 +51,17 @@ class PictureWallControllerTest extends TestCase | |||
50 | $this->container->bookmarkService | 51 | $this->container->bookmarkService |
51 | ->expects(static::once()) | 52 | ->expects(static::once()) |
52 | ->method('search') | 53 | ->method('search') |
53 | ->willReturnCallback(function (array $parameters, ?string $visibility): array { | 54 | ->willReturnCallback(function (array $parameters, ?string $visibility): SearchResult { |
54 | // Visibility is set through the container, not the call | 55 | // Visibility is set through the container, not the call |
55 | static::assertNull($visibility); | 56 | static::assertNull($visibility); |
56 | 57 | ||
57 | // No query parameters | 58 | // No query parameters |
58 | if (count($parameters) === 0) { | 59 | if (count($parameters) === 0) { |
59 | return [ | 60 | return SearchResult::getSearchResult([ |
60 | (new Bookmark())->setId(1)->setUrl('http://url.tld')->setThumbnail('thumb1'), | 61 | (new Bookmark())->setId(1)->setUrl('http://url.tld')->setThumbnail('thumb1'), |
61 | (new Bookmark())->setId(2)->setUrl('http://url2.tld'), | 62 | (new Bookmark())->setId(2)->setUrl('http://url2.tld'), |
62 | (new Bookmark())->setId(3)->setUrl('http://url3.tld')->setThumbnail('thumb2'), | 63 | (new Bookmark())->setId(3)->setUrl('http://url3.tld')->setThumbnail('thumb2'), |
63 | ]; | 64 | ]); |
64 | } | 65 | } |
65 | }) | 66 | }) |
66 | ; | 67 | ; |