Get userGroups.
public getUserGroups ( ) : |
||
리턴 |
public function testNegativeVoteWithoutGroup() { foreach ($this->user->getUserGroups() as $userGroup) { $this->user->removeUserGroup($userGroup); } $access = $this->voter->vote($this->token->reveal(), new SecurityCondition('sulu.security.roles'), ['security']); $this->assertSame(VoterInterface::ACCESS_DENIED, $access); }