From 33b1c252a75c98589a654ef250ca48833293dac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 15 Mar 2022 11:07:57 +0100 Subject: [PATCH] fixed review --- src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php | 1 - src/Wallabag/CoreBundle/Entity/Config.php | 4 ---- .../ApiBundle/Controller/ConfigRestControllerTest.php | 5 +---- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php index 64fe99b45..6dde08e81 100644 --- a/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php +++ b/src/Wallabag/CoreBundle/DataFixtures/ConfigFixtures.php @@ -24,7 +24,6 @@ class ConfigFixtures extends Fixture implements DependentFixtureInterface $adminConfig->setPocketConsumerKey('xxxxx'); $adminConfig->setActionMarkAsRead(0); $adminConfig->setListMode(0); - $adminConfig->setListMode(0); $manager->persist($adminConfig); diff --git a/src/Wallabag/CoreBundle/Entity/Config.php b/src/Wallabag/CoreBundle/Entity/Config.php index 1c53de1f1..f00077110 100644 --- a/src/Wallabag/CoreBundle/Entity/Config.php +++ b/src/Wallabag/CoreBundle/Entity/Config.php @@ -40,8 +40,6 @@ class Config * * @Assert\NotBlank() * @ORM\Column(name="theme", type="string", nullable=false) - * - * @Groups({"config_api"}) */ private $theme; @@ -106,8 +104,6 @@ class Config * @var string * * @ORM\Column(name="pocket_consumer_key", type="string", nullable=true) - * - * @Groups({"config_api"}) */ private $pocketConsumerKey; diff --git a/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php b/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php index c7c2fffcb..129c41f16 100644 --- a/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php +++ b/tests/Wallabag/ApiBundle/Controller/ConfigRestControllerTest.php @@ -14,17 +14,14 @@ class ConfigRestControllerTest extends WallabagApiTestCase $content = json_decode($this->client->getResponse()->getContent(), true); $this->assertArrayHasKey('id', $content); - $this->assertArrayHasKey('theme', $content); $this->assertArrayHasKey('items_per_page', $content); $this->assertArrayHasKey('language', $content); $this->assertArrayHasKey('reading_speed', $content); - $this->assertArrayHasKey('pocket_consumer_key', $content); $this->assertArrayHasKey('action_mark_as_read', $content); $this->assertArrayHasKey('list_mode', $content); - $this->assertSame('material', $content['theme']); $this->assertSame(200.0, $content['reading_speed']); - $this->assertSame('xxxxx', $content['pocket_consumer_key']); + $this->assertSame('en', $content['language']); $this->assertSame('application/json', $this->client->getResponse()->headers->get('Content-Type')); }