示例#1
0
 /**
  * @dataProvider getVoteTests
  */
 public function testVote($roles, $attributes, $expected)
 {
     $voter = new RoleVoter();
     $this->assertSame($expected, $voter->vote($this->getToken($roles), null, $attributes));
 }
示例#2
0
 public function __construct(RoleHierarchyInterface $roleHierarchy, $prefix = 'ROLE_')
 {
     $this->roleHierarchy = $roleHierarchy;
     parent::__construct($prefix);
 }