setOwnerAccount() 공개 메소드

public setOwnerAccount ( Account $ownerAccount )
$ownerAccount Neos\Flow\Security\Account
 /**
  * @test
  */
 public function administratorsCanSeeRestrictableEntitesWhichAreOwnedByAndi()
 {
     $account = $this->authenticateRoles(['Neos.Flow:Administrator']);
     $account->setAccountIdentifier('MyAccount');
     $account->setAuthenticationProviderName('SomeProvider');
     $andisAccount = new Security\Account();
     $andisAccount->setAccountIdentifier('Andi');
     $andisAccount->setAuthenticationProviderName('SomeProvider');
     $this->persistenceManager->add($account);
     $this->persistenceManager->add($andisAccount);
     $ownEntity = new Fixtures\RestrictableEntity('MyEntity');
     $ownEntity->setOwnerAccount($account);
     $andisEntity = new Fixtures\RestrictableEntity('AndisEntity');
     $andisEntity->setOwnerAccount($andisAccount);
     $this->restrictableEntityDoctrineRepository->add($ownEntity);
     $ownEntityIdentifier = $this->persistenceManager->getIdentifierByObject($ownEntity);
     $this->restrictableEntityDoctrineRepository->add($andisEntity);
     $andisEntityIdentifier = $this->persistenceManager->getIdentifierByObject($andisEntity);
     $this->persistenceManager->persistAll();
     $this->persistenceManager->clearState();
     $result = $this->restrictableEntityDoctrineRepository->findAllWithDql();
     $this->assertTrue(count($result) === 2);
     $this->assertNotNull($this->persistenceManager->getObjectByIdentifier($ownEntityIdentifier, Fixtures\RestrictableEntity::class));
     $this->assertNotNull($this->persistenceManager->getObjectByIdentifier($andisEntityIdentifier, Fixtures\RestrictableEntity::class));
     $this->restrictableEntityDoctrineRepository->removeAll();
     $this->persistenceManager->persistAll();
     $this->persistenceManager->clearState();
 }