Пример #1
0
 /**
  * @expectedException \InvalidArgumentException
  * @expectedExceptionMessage foo doesn't extend MyCLabs\ACL\Model\Role
  */
 public function testRegisterInvalidRoleClass()
 {
     $loader = new ACLMetadataLoader();
     $loader->registerRoleClass('foo', 'foo');
 }
Пример #2
0
 /**
  * Dynamically register a role subclass in the discriminator map for the Doctrine mapping.
  *
  * @param string $class
  * @param string $shortName
  *
  * @throws \InvalidArgumentException The given class doesn't extend MyCLabs\ACL\Model\Role
  */
 public function registerRoleClass($class, $shortName)
 {
     $this->metadataLoader->registerRoleClass($class, $shortName);
 }