public function createService(ServiceLocatorInterface $serviceLocator) { $config = $serviceLocator->get('config'); $config = $config['acl']; if (!isset($config['admins'])) { throw new \UnexpectedValueException('No admin-user set'); } $roleManager = new RoleManager(); $roleManager->setAdmins($config['admins'])->setAdminRole('admin')->setDefaultRole('guest')->setLoggedInRole('member'); return $roleManager; }
public function setUp() { $this->roleManager = new RoleManager(); $this->roleManager->setAdmins(array('foo' => array('bar', 'baz'), 'bza' => array('foobar', 'foobaz'))); }