Remove need to pass firewall name to log in in tests

One less usage of parameters in tests
This commit is contained in:
Yassine Guedidi
2025-11-23 00:59:35 +01:00
parent 3c6c0ed74e
commit a2497d9ce8
2 changed files with 2 additions and 4 deletions

View File

@ -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;
}