summaryrefslogtreecommitdiffstats
path: root/Core/Tests/Authorization/AccessDecisionManagerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'Core/Tests/Authorization/AccessDecisionManagerTest.php')
-rw-r--r--Core/Tests/Authorization/AccessDecisionManagerTest.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/Core/Tests/Authorization/AccessDecisionManagerTest.php b/Core/Tests/Authorization/AccessDecisionManagerTest.php
index 412af91..94b9820 100644
--- a/Core/Tests/Authorization/AccessDecisionManagerTest.php
+++ b/Core/Tests/Authorization/AccessDecisionManagerTest.php
@@ -65,7 +65,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
*/
public function testStrategies($strategy, $voters, $allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions, $expected)
{
- $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
+ $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock();
$manager = new AccessDecisionManager($voters, $strategy, $allowIfAllAbstainDecisions, $allowIfEqualGrantedDeniedDecisions);
$this->assertSame($expected, $manager->decide($token, array('ROLE_FOO')));
@@ -83,7 +83,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
public function getStrategiesWith2RolesTests()
{
- $token = $this->getMock('Symfony\Component\Security\Core\Authentication\Token\TokenInterface');
+ $token = $this->getMockBuilder('Symfony\Component\Security\Core\Authentication\Token\TokenInterface')->getMock();
return array(
array($token, 'affirmative', $this->getVoter(VoterInterface::ACCESS_DENIED), false),
@@ -101,7 +101,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
protected function getVoterFor2Roles($token, $vote1, $vote2)
{
- $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface');
+ $voter = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface')->getMock();
$voter->expects($this->any())
->method('vote')
->will($this->returnValueMap(array(
@@ -166,7 +166,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
protected function getVoter($vote)
{
- $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface');
+ $voter = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface')->getMock();
$voter->expects($this->any())
->method('vote')
->will($this->returnValue($vote));
@@ -176,7 +176,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
protected function getVoterSupportsClass($ret)
{
- $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface');
+ $voter = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface')->getMock();
$voter->expects($this->any())
->method('supportsClass')
->will($this->returnValue($ret));
@@ -186,7 +186,7 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
protected function getVoterSupportsAttribute($ret)
{
- $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface');
+ $voter = $this->getMockBuilder('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface')->getMock();
$voter->expects($this->any())
->method('supportsAttribute')
->will($this->returnValue($ret));