diff options
author | Fabien Potencier <fabien.potencier@gmail.com> | 2016-10-05 18:43:09 -0700 |
---|---|---|
committer | Fabien Potencier <fabien.potencier@gmail.com> | 2016-10-05 18:43:09 -0700 |
commit | cfc6f8ea250bb58798145b68bece93ce20f4a8f4 (patch) | |
tree | bef2e5627c7af7ae2bef8ca66618109b0712c43e /Core/Tests | |
parent | 382ae82de260e4a5c149627104a00273e3229937 (diff) | |
parent | d0d852abb163a9371a7f07d2bc80824cf2d81b4d (diff) | |
download | symfony-security-cfc6f8ea250bb58798145b68bece93ce20f4a8f4.zip symfony-security-cfc6f8ea250bb58798145b68bece93ce20f4a8f4.tar.gz symfony-security-cfc6f8ea250bb58798145b68bece93ce20f4a8f4.tar.bz2 |
Merge branch '2.7' into 2.8v2.8.13
* 2.7:
[HttpFoundation] JSONP callback validation
[Console] Improved the explanation of the hasOption() method
add missing use statement
bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
Diffstat (limited to 'Core/Tests')
-rw-r--r-- | Core/Tests/Authorization/Voter/RoleVoterTest.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Core/Tests/Authorization/Voter/RoleVoterTest.php b/Core/Tests/Authorization/Voter/RoleVoterTest.php index 03ab2da..c15e936 100644 --- a/Core/Tests/Authorization/Voter/RoleVoterTest.php +++ b/Core/Tests/Authorization/Voter/RoleVoterTest.php @@ -43,6 +43,12 @@ class RoleVoterTest extends \PHPUnit_Framework_TestCase array(array('ROLE_FOO'), array('ROLE_FOO'), VoterInterface::ACCESS_GRANTED), array(array('ROLE_FOO'), array('FOO', 'ROLE_FOO'), VoterInterface::ACCESS_GRANTED), array(array('ROLE_BAR', 'ROLE_FOO'), array('ROLE_FOO'), VoterInterface::ACCESS_GRANTED), + + // Test mixed Types + array(array(), array(array()), VoterInterface::ACCESS_ABSTAIN), + array(array(), array(new \stdClass()), VoterInterface::ACCESS_ABSTAIN), + array(array('ROLE_BAR'), array(new Role('ROLE_BAR')), VoterInterface::ACCESS_GRANTED), + array(array('ROLE_BAR'), array(new Role('ROLE_FOO')), VoterInterface::ACCESS_DENIED), ); } |