summaryrefslogtreecommitdiffstats
path: root/Core/Tests/Authorization
diff options
context:
space:
mode:
authorFabien Potencier <fabien.potencier@gmail.com>2015-10-02 14:41:26 +0200
committerFabien Potencier <fabien.potencier@gmail.com>2015-10-02 14:41:26 +0200
commitd2ccf53c9b72af1feaf0096f72c9d4ae9d7b4501 (patch)
tree44a520a7b7ca4244c17e299eb91c6ae3532653db /Core/Tests/Authorization
parente07dcacff6d021606bdae6f455cd2fe6a5959a72 (diff)
parent39e013d91988a626062431610bb2483612cf295a (diff)
downloadsymfony-security-d2ccf53c9b72af1feaf0096f72c9d4ae9d7b4501.zip
symfony-security-d2ccf53c9b72af1feaf0096f72c9d4ae9d7b4501.tar.gz
symfony-security-d2ccf53c9b72af1feaf0096f72c9d4ae9d7b4501.tar.bz2
feature #16035 [3.0][Security] Remove deprecated features (follow up of #15899) (Koc)
This PR was merged into the 3.0-dev branch. Discussion ---------- [3.0][Security] Remove deprecated features (follow up of #15899) | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15899 | License | MIT | Doc PR | - - updated UPGRADE-3.0.md - removed unused `supportsClass` methods - changed visibility of `supportsAttribute` methods from public to private, removed `inheritdoc` annotation from them because there is no definition for this methods in parent interface - removed tests for `supportsClass` and `supportsAttribute` method - removed unused mock creation Commits ------- 437398d [3.0][Security] Remove deprecated features (follow up of #15899)
Diffstat (limited to 'Core/Tests/Authorization')
-rw-r--r--Core/Tests/Authorization/AccessDecisionManagerTest.php20
-rw-r--r--Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php6
-rw-r--r--Core/Tests/Authorization/Voter/ExpressionVoterTest.php9
-rw-r--r--Core/Tests/Authorization/Voter/RoleVoterTest.php7
4 files changed, 0 insertions, 42 deletions
diff --git a/Core/Tests/Authorization/AccessDecisionManagerTest.php b/Core/Tests/Authorization/AccessDecisionManagerTest.php
index 9c23672..72bae0a 100644
--- a/Core/Tests/Authorization/AccessDecisionManagerTest.php
+++ b/Core/Tests/Authorization/AccessDecisionManagerTest.php
@@ -137,24 +137,4 @@ class AccessDecisionManagerTest extends \PHPUnit_Framework_TestCase
return $voter;
}
-
- protected function getVoterSupportsClass($ret)
- {
- $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface');
- $voter->expects($this->any())
- ->method('supportsClass')
- ->will($this->returnValue($ret));
-
- return $voter;
- }
-
- protected function getVoterSupportsAttribute($ret)
- {
- $voter = $this->getMock('Symfony\Component\Security\Core\Authorization\Voter\VoterInterface');
- $voter->expects($this->any())
- ->method('supportsAttribute')
- ->will($this->returnValue($ret));
-
- return $voter;
- }
}
diff --git a/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php b/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
index 4679c0f..60e2a19 100644
--- a/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
+++ b/Core/Tests/Authorization/Voter/AuthenticatedVoterTest.php
@@ -17,12 +17,6 @@ use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
class AuthenticatedVoterTest extends \PHPUnit_Framework_TestCase
{
- public function testSupportsClass()
- {
- $voter = new AuthenticatedVoter($this->getResolver());
- $this->assertTrue($voter->supportsClass('stdClass'));
- }
-
/**
* @dataProvider getVoteTests
*/
diff --git a/Core/Tests/Authorization/Voter/ExpressionVoterTest.php b/Core/Tests/Authorization/Voter/ExpressionVoterTest.php
index dc8ea79..5296296 100644
--- a/Core/Tests/Authorization/Voter/ExpressionVoterTest.php
+++ b/Core/Tests/Authorization/Voter/ExpressionVoterTest.php
@@ -17,15 +17,6 @@ use Symfony\Component\Security\Core\Role\Role;
class ExpressionVoterTest extends \PHPUnit_Framework_TestCase
{
- public function testSupportsAttribute()
- {
- $expression = $this->createExpression();
- $expressionLanguage = $this->getMock('Symfony\Component\Security\Core\Authorization\ExpressionLanguage');
- $voter = new ExpressionVoter($expressionLanguage, $this->createTrustResolver(), $this->createRoleHierarchy());
-
- $this->assertTrue($voter->supportsAttribute($expression));
- }
-
/**
* @dataProvider getVoteTests
*/
diff --git a/Core/Tests/Authorization/Voter/RoleVoterTest.php b/Core/Tests/Authorization/Voter/RoleVoterTest.php
index 03ab2da..9982bdf 100644
--- a/Core/Tests/Authorization/Voter/RoleVoterTest.php
+++ b/Core/Tests/Authorization/Voter/RoleVoterTest.php
@@ -17,13 +17,6 @@ use Symfony\Component\Security\Core\Role\Role;
class RoleVoterTest extends \PHPUnit_Framework_TestCase
{
- public function testSupportsClass()
- {
- $voter = new RoleVoter();
-
- $this->assertTrue($voter->supportsClass('Foo'));
- }
-
/**
* @dataProvider getVoteTests
*/