diff options
author | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-11-29 11:01:15 +0100 |
---|---|---|
committer | Nicolas Grekas <nicolas.grekas@gmail.com> | 2015-11-29 11:01:15 +0100 |
commit | f48bdc7c4234c9adc53c348f6a73f3bbd65991ba (patch) | |
tree | b1aa50a86c0bee623b456e0f4f260e284d7fdd91 /Core/Tests/Authorization | |
parent | 4cd8503763e54eefccebd4d784fc6f7160219dbe (diff) | |
parent | 490d8f077ab8cfa465e6f2ab93a557a78b4d4635 (diff) | |
download | symfony-security-f48bdc7c4234c9adc53c348f6a73f3bbd65991ba.zip symfony-security-f48bdc7c4234c9adc53c348f6a73f3bbd65991ba.tar.gz symfony-security-f48bdc7c4234c9adc53c348f6a73f3bbd65991ba.tar.bz2 |
Merge branch '2.8'
* 2.8:
[Bridge/Twig] Fix lowest form dep
[Bridge/Doctrine] Fix legacy tests
Make sure security.role_hierarchy.roles always exists
[Form] Fix tests and reference usage
[SecurityBundle] Fix disabling of RoleHierarchyVoter when passing empty hierarchy
Conflicts:
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/AbstractEntityChoiceListCompositeIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/AbstractEntityChoiceListSingleAssociationToIntIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/AbstractEntityChoiceListSingleIntIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/AbstractEntityChoiceListSingleStringIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/AbstractEntityChoiceListTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/LoadedEntityChoiceListCompositeIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/LoadedEntityChoiceListSingleAssociationToIntIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/LoadedEntityChoiceListSingleIntIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/LoadedEntityChoiceListSingleStringIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListCompositeIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListCompositeIdWithQueryBuilderTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleAssociationToIntIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleAssociationToIntIdWithQueryBuilderTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleIntIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleIntIdWithQueryBuilderTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleStringIdTest.php
src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleStringIdWithQueryBuilderTest.php
src/Symfony/Bundle/SecurityBundle/Resources/config/security.xml
src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
Diffstat (limited to 'Core/Tests/Authorization')
-rw-r--r-- | Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php b/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php index c50ecf3..4b03bac 100644 --- a/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php +++ b/Core/Tests/Authorization/Voter/RoleHierarchyVoterTest.php @@ -33,4 +33,19 @@ class RoleHierarchyVoterTest extends RoleVoterTest array(array('ROLE_FOO'), array('ROLE_FOOBAR'), VoterInterface::ACCESS_GRANTED), )); } + + /** + * @dataProvider getVoteWithEmptyHierarchyTests + */ + public function testVoteWithEmptyHierarchy($roles, $attributes, $expected) + { + $voter = new RoleHierarchyVoter(new RoleHierarchy(array())); + + $this->assertSame($expected, $voter->vote($this->getToken($roles), null, $attributes)); + } + + public function getVoteWithEmptyHierarchyTests() + { + return parent::getVoteTests(); + } } |