diff options
Diffstat (limited to 'Tests/Core')
-rw-r--r-- | Tests/Core/User/UserCheckerTest.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Tests/Core/User/UserCheckerTest.php b/Tests/Core/User/UserCheckerTest.php index f28067f..dca6311 100644 --- a/Tests/Core/User/UserCheckerTest.php +++ b/Tests/Core/User/UserCheckerTest.php @@ -15,44 +15,44 @@ use Symfony\Component\Security\Core\User\UserChecker; class UserCheckerTest extends \PHPUnit_Framework_TestCase { - public function testCheckPreAuthNotAdvancedUserInterface() + public function testCheckPostAuthNotAdvancedUserInterface() { $checker = new UserChecker(); - $this->assertNull($checker->checkPreAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); + $this->assertNull($checker->checkPostAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); } - public function testCheckPreAuthPass() + public function testCheckPostAuthPass() { $checker = new UserChecker(); $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $account->expects($this->once())->method('isCredentialsNonExpired')->will($this->returnValue(true)); - $this->assertNull($checker->checkPreAuth($account)); + $this->assertNull($checker->checkPostAuth($account)); } /** * @expectedException \Symfony\Component\Security\Core\Exception\CredentialsExpiredException */ - public function testCheckPreAuthCredentialsExpired() + public function testCheckPostAuthCredentialsExpired() { $checker = new UserChecker(); $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $account->expects($this->once())->method('isCredentialsNonExpired')->will($this->returnValue(false)); - $checker->checkPreAuth($account); + $checker->checkPostAuth($account); } - public function testCheckPostAuthNotAdvancedUserInterface() + public function testCheckPreAuthNotAdvancedUserInterface() { $checker = new UserChecker(); - $this->assertNull($checker->checkPostAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); + $this->assertNull($checker->checkPreAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); } - public function testCheckPostAuthPass() + public function testCheckPreAuthPass() { $checker = new UserChecker(); @@ -61,26 +61,26 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase $account->expects($this->once())->method('isEnabled')->will($this->returnValue(true)); $account->expects($this->once())->method('isAccountNonExpired')->will($this->returnValue(true)); - $this->assertNull($checker->checkPostAuth($account)); + $this->assertNull($checker->checkPreAuth($account)); } /** * @expectedException \Symfony\Component\Security\Core\Exception\LockedException */ - public function testCheckPostAuthAccountLocked() + public function testCheckPreAuthAccountLocked() { $checker = new UserChecker(); $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(false)); - $checker->checkPostAuth($account); + $checker->checkPreAuth($account); } /** * @expectedException \Symfony\Component\Security\Core\Exception\DisabledException */ - public function testCheckPostAuthDisabled() + public function testCheckPreAuthDisabled() { $checker = new UserChecker(); @@ -88,13 +88,13 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(true)); $account->expects($this->once())->method('isEnabled')->will($this->returnValue(false)); - $checker->checkPostAuth($account); + $checker->checkPreAuth($account); } /** * @expectedException \Symfony\Component\Security\Core\Exception\AccountExpiredException */ - public function testCheckPostAuthAccountExpired() + public function testCheckPreAuthAccountExpired() { $checker = new UserChecker(); @@ -103,6 +103,6 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase $account->expects($this->once())->method('isEnabled')->will($this->returnValue(true)); $account->expects($this->once())->method('isAccountNonExpired')->will($this->returnValue(false)); - $checker->checkPostAuth($account); + $checker->checkPreAuth($account); } } |