The voter will get a list of user roles, and can loop through it to check if it supports the roles, eg. based
on their prefix.
If the voter returns false, we will not ask him to vote, if it returns true, the voter must vote.
public supportsRole ( |
||
$role | A Role instances that the current route requires. | |
return | boolean |
public function testSupportsRole() { $voter = new AuthenticationVoter(); $this->assertTrue($voter->supportsRole(new Role("ROLE_MOCK"))); }