/** * {@inheritdoc} */ protected function deleteEntity($entity, ObjectManager $em) { parent::deleteEntity($entity, $em); if ($this->aclSidManager->isAclEnabled()) { $this->aclSidManager->deleteSid($this->aclSidManager->getSid($entity)); } }
public function testDeleteSid() { $sid = $this->getMock('Symfony\\Component\\Security\\Acl\\Model\\SecurityIdentityInterface'); $this->aclProvider->expects($this->once())->method('deleteSecurityIdentity')->with($this->identicalTo($sid)); $this->manager->deleteSid($sid); }