Example #1
0
 public function testIsGrantedNoMatchingSecurityIdentity()
 {
     $collection = new \PropelObjectCollection();
     $collection->setModel('Propel\\PropelBundle\\Model\\Acl\\Entry');
     $entry = $this->createEntry();
     $entry->setSecurityIdentity(SecurityIdentity::fromAclIdentity($this->getRoleSecurityIdentity('ROLE_ADMIN')))->setAclClass($this->getAclClass());
     $collection->append($entry);
     $acl = new Acl($collection, $this->getAclObjectIdentity(), new PermissionGrantingStrategy());
     $this->setExpectedException('Symfony\\Component\\Security\\Acl\\Exception\\NoAceFoundException');
     $acl->isGranted(array(64), array($this->getRoleSecurityIdentity('ROLE_USER')));
 }