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/LegacySecurityContextTest.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/LegacySecurityContextTest.php')
-rw-r--r-- | Core/Tests/LegacySecurityContextTest.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Core/Tests/LegacySecurityContextTest.php b/Core/Tests/LegacySecurityContextTest.php index fbb847e..f86fcad 100644 --- a/Core/Tests/LegacySecurityContextTest.php +++ b/Core/Tests/LegacySecurityContextTest.php @@ -24,14 +24,14 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase protected function setUp() { - $this->tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); - $this->authorizationChecker = $this->getMock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'); + $this->tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $this->authorizationChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface')->getMock(); $this->securityContext = new SecurityContext($this->tokenStorage, $this->authorizationChecker); } public function testGetTokenDelegation() { - $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); $this->tokenStorage ->expects($this->once()) @@ -43,7 +43,7 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase public function testSetTokenDelegation() { - $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface'); + $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock(); $this->tokenStorage ->expects($this->once()) @@ -83,8 +83,8 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase */ public function testOldConstructorSignature() { - $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); - $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); new SecurityContext($authenticationManager, $accessDecisionManager); } @@ -99,10 +99,10 @@ class LegacySecurityContextTest extends \PHPUnit_Framework_TestCase public function oldConstructorSignatureFailuresProvider() { - $tokenStorage = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface'); - $authorizationChecker = $this->getMock('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface'); - $authenticationManager = $this->getMock('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface'); - $accessDecisionManager = $this->getMock('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface'); + $tokenStorage = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface')->getMock(); + $authorizationChecker = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface')->getMock(); + $authenticationManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface')->getMock(); + $accessDecisionManager = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\AccessDecisionManagerInterface')->getMock(); return array( array(new \stdClass(), new \stdClass()), |