mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 23:53:50 +00:00
Apply rector rules: symfony up to 54
This commit is contained in:
@@ -16,7 +16,6 @@ use Chill\MainBundle\Repository\UserRepositoryInterface;
|
||||
use Chill\MainBundle\Test\PrepareClientTrait;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
@@ -34,7 +33,7 @@ final class UserControllerTest extends WebTestCase
|
||||
|
||||
$user = new User();
|
||||
$user->setUsername('Test_user '.uniqid());
|
||||
$user->setPassword(self::getContainer()->get(UserPasswordEncoderInterface::class)->encodePassword(
|
||||
$user->setPassword(self::getContainer()->get(\Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::class)->encodePassword(
|
||||
$user,
|
||||
'password'
|
||||
));
|
||||
@@ -138,9 +137,9 @@ final class UserControllerTest extends WebTestCase
|
||||
|
||||
protected function isPasswordValid($username, $password)
|
||||
{
|
||||
/** @var \Symfony\Component\Security\Core\Encoder\UserPasswordEncoder $passwordEncoder */
|
||||
/** @var \Symfony\Component\PasswordHasher\Hasher\UserPasswordHasher $passwordEncoder */
|
||||
$passwordEncoder = self::getContainer()
|
||||
->get(UserPasswordEncoderInterface::class);
|
||||
->get(\Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface::class);
|
||||
|
||||
$user = self::getContainer()->get(UserRepositoryInterface::class)
|
||||
->findOneBy(['username' => $username]);
|
||||
|
Reference in New Issue
Block a user