/**
  * @dataProvider provideObjectIdentifiers
  */
 public function testPermissionUpdateEvent($objectId, $objectType, $objectIdentifier)
 {
     $this->aclProvider->findAcl(new ObjectIdentity($objectIdentifier, $objectType))->willThrow(AclNotFoundException::class);
     $this->aclProvider->createAcl(new ObjectIdentity($objectIdentifier, $objectType))->willReturn($this->acl->reveal())->shouldBeCalled();
     $this->aclProvider->updateAcl($this->acl->reveal())->shouldBeCalled();
     $this->acl->getObjectAces()->willReturn([]);
     $this->acl->insertObjectAce(Argument::cetera())->shouldBeCalled();
     $this->accessControlManager->setPermissions($objectType, $objectId, [$this->securityIdentity->getRole() => ['view']]);
 }
 /**
  * @dataProvider provideObjectIdentifiers
  */
 public function testPermissionUpdateEvent($objectId, $objectType, $locale, $objectIdentifier)
 {
     $this->aclProvider->findAcl(new ObjectIdentity($objectIdentifier, $objectType))->willThrow(AclNotFoundException::class);
     $this->aclProvider->createAcl(new ObjectIdentity($objectIdentifier, $objectType))->willReturn($this->acl->reveal())->shouldBeCalled();
     $this->aclProvider->updateAcl($this->acl->reveal())->shouldBeCalled();
     $this->acl->getObjectAces()->willReturn([]);
     $this->acl->insertObjectAce(Argument::cetera())->shouldBeCalled();
     $this->eventDispatcher->dispatch('sulu.security.permission.update', new PermissionUpdateEvent($objectType, $objectIdentifier, $this->securityIdentity, ['view']))->shouldBeCalled();
     $this->accessControlManager->setPermissions($objectType, $objectId, $this->securityIdentity, ['view'], $locale);
 }