public function listresourcesandrightsAction() { $resources = []; $rights = []; if ($this->request->isPost()) { $roleId = $this->request->getPost('roleId', 0); $resources = $this->aclmodel->getResourceByRole($roleId); $rights = $this->aclmodel->getRightLists($roleId); } return new JsonModel(['resources' => $resources, 'rights' => $rights]); }
/** * @dataProvider provideRoleResources */ public function testGetResourceByRole($role, $result) { $this->assertEquals($result, $this->acl->getResourceByRole($role)); }