From a2497d9ce8538781d8fe6863173320a56dc516a0 Mon Sep 17 00:00:00 2001 From: Yassine Guedidi Date: Sun, 23 Nov 2025 00:59:35 +0100 Subject: [PATCH] Remove need to pass firewall name to log in in tests One less usage of parameters in tests --- tests/Controller/Api/WallabagApiTestCase.php | 3 +-- tests/WallabagTestCase.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/Controller/Api/WallabagApiTestCase.php b/tests/Controller/Api/WallabagApiTestCase.php index e04020a6f..603b0ca86 100644 --- a/tests/Controller/Api/WallabagApiTestCase.php +++ b/tests/Controller/Api/WallabagApiTestCase.php @@ -46,14 +46,13 @@ abstract class WallabagApiTestCase extends WebTestCase /** @var UserManager $userManager */ $userManager = $container->get('fos_user.user_manager'); - $firewallName = $container->getParameter('fos_user.firewall_name'); $adminUser = $userManager->findUserBy(['username' => 'admin']); \assert($adminUser instanceof User); $this->user = $adminUser; - $client->loginUser($adminUser, $firewallName); + $client->loginUser($adminUser); return $client; } diff --git a/tests/WallabagTestCase.php b/tests/WallabagTestCase.php index 9b31f8029..6460dd426 100644 --- a/tests/WallabagTestCase.php +++ b/tests/WallabagTestCase.php @@ -53,7 +53,6 @@ abstract class WallabagTestCase extends WebTestCase $container = static::getContainer(); $userManager = $container->get('fos_user.user_manager'); - $firewallName = $container->getParameter('fos_user.firewall_name'); $user = $userManager->findUserBy(['username' => $username]); @@ -61,7 +60,7 @@ abstract class WallabagTestCase extends WebTestCase throw new \Exception('Unable to find user "' . $username . '". Does fixtures were loaded?'); } - $this->client->loginUser($user, $firewallName); + $this->client->loginUser($user); } /**