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