Example #1
0
 /**
  * {@inheritdoc}
  */
 public function getRoles()
 {
     $roles = parent::getRoles();
     foreach ($this->getAuthorizationRoles() as $role) {
         $roles = array_merge($roles, $role->getSecurityRoles());
     }
     return $roles;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function __construct()
 {
     parent::__construct();
     $this->roles = [AdminUserInterface::DEFAULT_ADMIN_ROLE];
 }
 function it_refreshes_user(UserRepositoryInterface $userRepository, User $user, UserInterface $refreshedUser)
 {
     $userRepository->find(1)->willReturn($refreshedUser);
     $user->getId()->willReturn(1);
     $this->refreshUser($user)->shouldReturn($refreshedUser);
 }