mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-14 21:31:23 +00:00
Rector changes and immplementations of required methods
This commit is contained in:
@@ -34,9 +34,9 @@ final class TokenManagerTest extends KernelTestCase
|
||||
$this->tokenManager = new TokenManager('secret', $logger);
|
||||
}
|
||||
|
||||
public static function setUpBefore() {}
|
||||
public static function setUpBefore(): void {}
|
||||
|
||||
public function testGenerate()
|
||||
public function testGenerate(): void
|
||||
{
|
||||
$tokenManager = $this->tokenManager;
|
||||
$user = (new User())->setUsernameCanonical('test');
|
||||
@@ -52,7 +52,7 @@ final class TokenManagerTest extends KernelTestCase
|
||||
$this->assertEquals($user->getUsernameCanonical(), $tokens['u']);
|
||||
}
|
||||
|
||||
public function testGenerateEmptyUsernameCanonical()
|
||||
public function testGenerateEmptyUsernameCanonical(): void
|
||||
{
|
||||
$this->expectException(\UnexpectedValueException::class);
|
||||
|
||||
@@ -64,7 +64,7 @@ final class TokenManagerTest extends KernelTestCase
|
||||
$tokenManager->generate($user, $expiration);
|
||||
}
|
||||
|
||||
public function testVerify()
|
||||
public function testVerify(): void
|
||||
{
|
||||
$tokenManager = $this->tokenManager;
|
||||
$user = (new User())->setUsernameCanonical('test');
|
||||
@@ -87,7 +87,7 @@ final class TokenManagerTest extends KernelTestCase
|
||||
$this->assertFalse($tokenManager->verify($hash, $token, $user, (string) ($timestamp + 1)));
|
||||
}
|
||||
|
||||
public function testVerifyExpiredFails()
|
||||
public function testVerifyExpiredFails(): void
|
||||
{
|
||||
$tokenManager = $this->tokenManager;
|
||||
$user = (new User())->setUsernameCanonical('test');
|
||||
|
||||
Reference in New Issue
Block a user