mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Pass tests
This commit is contained in:
@@ -140,7 +140,7 @@ class RecoveryService
|
||||
{
|
||||
$token = $this->tokenRepository->findValidToken($resetToken);
|
||||
|
||||
if ($token === null || $token->getType() == TokenManipulator::TYPE_PASSWORD) {
|
||||
if ($token === null || $token->getType() != TokenManipulator::TYPE_PASSWORD) {
|
||||
$this->application->abort(401, 'A token is required');
|
||||
}
|
||||
|
||||
|
@@ -332,7 +332,7 @@ class LoginTest extends \PhraseanetAuthenticatedWebTestCase
|
||||
]);
|
||||
|
||||
$response = self::$DI['client']->getResponse();
|
||||
$this->assertEquals(401, $response->getStatusCode());
|
||||
$this->assertEquals(200, $response->getStatusCode());
|
||||
}
|
||||
|
||||
public function testRenewPasswordBadTokenWheneverItsAuthenticated()
|
||||
@@ -359,7 +359,7 @@ class LoginTest extends \PhraseanetAuthenticatedWebTestCase
|
||||
|
||||
$response = self::$DI['client']->getResponse();
|
||||
|
||||
$this->assertEquals(401, $response->getStatusCode());
|
||||
$this->assertEquals(200, $response->getStatusCode());
|
||||
}
|
||||
|
||||
public function testRenewPasswordNoTokenWheneverItsAuthenticated()
|
||||
|
Reference in New Issue
Block a user