/**
  * Adds an annotation ancestor
  *
  * @param  AclAnnotationAncestor     $ancestor
  * @param  string|null               $class
  * @param  string|null               $method
  * @throws \RuntimeException
  * @throws \InvalidArgumentException
  */
 public function addAncestor(AclAnnotationAncestor $ancestor, $class = null, $method = null)
 {
     if ($class !== null) {
         $this->addBinding($ancestor->getId(), $class, $method);
     }
 }
Example #2
0
 public function testAncestor()
 {
     $aclAncestor = new AclAncestor(array('value' => 'test_acl'));
     $this->assertEquals('test_acl', $aclAncestor->getId());
 }