aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/front/controller/visitor/PictureWallControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/front/controller/visitor/PictureWallControllerTest.php')
-rw-r--r--tests/front/controller/visitor/PictureWallControllerTest.php7
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);
5namespace Shaarli\Front\Controller\Visitor; 5namespace Shaarli\Front\Controller\Visitor;
6 6
7use Shaarli\Bookmark\Bookmark; 7use Shaarli\Bookmark\Bookmark;
8use Shaarli\Bookmark\SearchResult;
8use Shaarli\Config\ConfigManager; 9use Shaarli\Config\ConfigManager;
9use Shaarli\Front\Exception\ThumbnailsDisabledException; 10use Shaarli\Front\Exception\ThumbnailsDisabledException;
10use Shaarli\TestCase; 11use 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 ;