/** * @expectedException \Phalcon\Acl\Exception * @expectedExceptionMessage Role "user" cannot inherit non-existent role "nonexistentrole". * Either such role does not exist or it is set to be inherited before it is actually defined. */ public function testFactoryShouldThrowExceptionIfNonExistentInheritRoleIsSet() { $config = new Ini(INCUBATOR_FIXTURES . 'Acl/acl.ini'); $config->acl->role->user->inherit = 'nonexistentrole'; $factory = new MemoryFactory(); $factory->create($config->get('acl')); }