aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/front/controller/admin/ThumbnailsControllerTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-10-02 17:50:59 +0200
committerArthurHoaro <arthur@hoa.ro>2020-10-13 13:50:11 +0200
commitefb7d21b52eb033530e80e5e49d175e6e3b031f4 (patch)
tree4f34052788a08be1a30cb88c3339ae14e0b7c4da /tests/front/controller/admin/ThumbnailsControllerTest.php
parent29c31b7ec6ca48ba37b7eb6da650931fd0cb7164 (diff)
downloadShaarli-efb7d21b52eb033530e80e5e49d175e6e3b031f4.tar.gz
Shaarli-efb7d21b52eb033530e80e5e49d175e6e3b031f4.tar.zst
Shaarli-efb7d21b52eb033530e80e5e49d175e6e3b031f4.zip
Add strict types for bookmarks management
Parameters typing and using strict types overall increase the codebase quality by enforcing the a given parameter will have the expected type. It also removes the need to unnecessary unit tests checking methods behavior with invalid input.
Diffstat (limited to 'tests/front/controller/admin/ThumbnailsControllerTest.php')
-rw-r--r--tests/front/controller/admin/ThumbnailsControllerTest.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/front/controller/admin/ThumbnailsControllerTest.php b/tests/front/controller/admin/ThumbnailsControllerTest.php
index f4a8acff..e5749654 100644
--- a/tests/front/controller/admin/ThumbnailsControllerTest.php
+++ b/tests/front/controller/admin/ThumbnailsControllerTest.php
@@ -89,8 +89,10 @@ class ThumbnailsControllerTest extends TestCase
89 $this->container->bookmarkService 89 $this->container->bookmarkService
90 ->expects(static::once()) 90 ->expects(static::once())
91 ->method('set') 91 ->method('set')
92 ->willReturnCallback(function (Bookmark $bookmark) use ($thumb) { 92 ->willReturnCallback(function (Bookmark $bookmark) use ($thumb): Bookmark {
93 static::assertSame($thumb, $bookmark->getThumbnail()); 93 static::assertSame($thumb, $bookmark->getThumbnail());
94
95 return $bookmark;
94 }) 96 })
95 ; 97 ;
96 98