Exemplo n.º 1
0
 public function test_has_role_by_name_when_when_role_assigned()
 {
     $this->user->setRoles([$this->admin]);
     $this->assertTrue($this->user->hasRoleByName('admin'));
 }
Exemplo n.º 2
0
 public function test_has_all_role_by_name_when_role_assigned()
 {
     $this->user->setRoles([$this->admin, $this->extraRole1, $this->extraRole2]);
     $this->assertTrue($this->user->hasRoleByName(['admin', 'extraRole1', 'extraRole2'], true));
 }