/** * @return void */ public function testRemoveRole() { $roleData = $this->mockRoleData(); $roleDto = $this->facade->addRole($roleData['name']); $groupData = $this->mockGroupData(); $this->facade->addGroup($groupData['name'], $this->rolesTransfer); $removed = $this->facade->removeRole($roleDto->getIdAclRole()); $this->assertTrue($removed); try { $this->facade->getRoleById($roleDto->getIdAclRole()); } catch (EmptyEntityException $e) { $this->assertInstanceOf('\\Spryker\\Zed\\Acl\\Business\\Exception\\EmptyEntityException', $e); } }
/** * @param int $idAclRole * * @return array */ public function getData($idAclRole) { $roleTransfer = $this->aclFacade->getRoleById($idAclRole); return $roleTransfer->toArray(); }