From 19322142c3cbc9968b78e3bc0c78e0de46aee6f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 13 Jun 2023 15:25:47 +0200 Subject: [PATCH] Fixed testsuite --- src/Wallabag/UserBundle/EventListener/CreateConfigListener.php | 2 +- .../Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php | 3 ++- .../UserBundle/EventListener/CreateConfigListenerTest.php | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php index e53797c0a..a700115fc 100644 --- a/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php +++ b/src/Wallabag/UserBundle/EventListener/CreateConfigListener.php @@ -25,7 +25,7 @@ class CreateConfigListener implements EventSubscriberInterface private $session; private $displayThumbnails; - public function __construct(EntityManagerInterface $em, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, SessionInterface $session, $displayThumbnails) + public function __construct(EntityManagerInterface $em, $itemsOnPage, $feedLimit, $language, $readingSpeed, $actionMarkAsRead, $listMode, $displayThumbnails, SessionInterface $session) { $this->em = $em; $this->itemsOnPage = $itemsOnPage; diff --git a/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php index e6cd6eb5c..65b2384d5 100644 --- a/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php @@ -19,11 +19,12 @@ class ConfigRestControllerTest extends WallabagApiTestCase $this->assertArrayHasKey('reading_speed', $config); $this->assertArrayHasKey('action_mark_as_read', $config); $this->assertArrayHasKey('list_mode', $config); + $this->assertArrayHasKey('display_thumbnails', $config); $this->assertSame(200.0, $config['reading_speed']); $this->assertSame('en', $config['language']); - $this->assertCount(6, $config); + $this->assertCount(7, $config); $this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type')); } diff --git a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php index 12cc2d1eb..c4077016d 100644 --- a/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php +++ b/tests/Wallabag/UserBundle/EventListener/CreateConfigListenerTest.php @@ -38,6 +38,7 @@ class CreateConfigListenerTest extends TestCase 1, 1, 1, + 1, $session );