diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 10:02:29 +0100 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-12-19 16:22:46 +0100 |
commit | 0582ad240b9aa4b86945b3fdee0f84b20eb0856f (patch) | |
tree | e2eff67cc198e382599df30992fc598c433b9b6e /Core/Tests/User/UserCheckerTest.php | |
parent | e396644d91c69dd7844f83735832e896e6ed4bf3 (diff) | |
download | symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.zip symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.tar.gz symfony-security-0582ad240b9aa4b86945b3fdee0f84b20eb0856f.tar.bz2 |
fixed obsolete getMock() usage
Diffstat (limited to 'Core/Tests/User/UserCheckerTest.php')
-rw-r--r-- | Core/Tests/User/UserCheckerTest.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Core/Tests/User/UserCheckerTest.php b/Core/Tests/User/UserCheckerTest.php index ac21781..4b6e527 100644 --- a/Core/Tests/User/UserCheckerTest.php +++ b/Core/Tests/User/UserCheckerTest.php @@ -19,14 +19,14 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase { $checker = new UserChecker(); - $this->assertNull($checker->checkPostAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); + $this->assertNull($checker->checkPostAuth($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())); } public function testCheckPostAuthPass() { $checker = new UserChecker(); - $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); $account->expects($this->once())->method('isCredentialsNonExpired')->will($this->returnValue(true)); $this->assertNull($checker->checkPostAuth($account)); @@ -39,7 +39,7 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase { $checker = new UserChecker(); - $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); $account->expects($this->once())->method('isCredentialsNonExpired')->will($this->returnValue(false)); $checker->checkPostAuth($account); @@ -49,14 +49,14 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase { $checker = new UserChecker(); - $this->assertNull($checker->checkPreAuth($this->getMock('Symfony\Component\Security\Core\User\UserInterface'))); + $this->assertNull($checker->checkPreAuth($this->getMockBuilder('Symfony\Component\Security\Core\User\UserInterface')->getMock())); } public function testCheckPreAuthPass() { $checker = new UserChecker(); - $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(true)); $account->expects($this->once())->method('isEnabled')->will($this->returnValue(true)); $account->expects($this->once())->method('isAccountNonExpired')->will($this->returnValue(true)); @@ -71,7 +71,7 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase { $checker = new UserChecker(); - $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(false)); $checker->checkPreAuth($account); @@ -84,7 +84,7 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase { $checker = new UserChecker(); - $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(true)); $account->expects($this->once())->method('isEnabled')->will($this->returnValue(false)); @@ -98,7 +98,7 @@ class UserCheckerTest extends \PHPUnit_Framework_TestCase { $checker = new UserChecker(); - $account = $this->getMock('Symfony\Component\Security\Core\User\AdvancedUserInterface'); + $account = $this->getMockBuilder('Symfony\Component\Security\Core\User\AdvancedUserInterface')->getMock(); $account->expects($this->once())->method('isAccountNonLocked')->will($this->returnValue(true)); $account->expects($this->once())->method('isEnabled')->will($this->returnValue(true)); $account->expects($this->once())->method('isAccountNonExpired')->will($this->returnValue(false)); |