public function inOperatorWorksWithSimpleArrays()
{
// These relations are needed to fulfill the policy that is tested in "inOperatorWorksWithGlobalObjectAccess" as the globalObject has an empty array in this test, the query will do a "(NOT) IS NULL" constraint for this relation.
$testEntityD = new Fixtures\TestEntityD();
$testEntityD2 = new Fixtures\TestEntityD();
$this->testEntityDDoctrineRepository->add($testEntityD);
$this->testEntityDDoctrineRepository->add($testEntityD2);
$testEntityC = new Fixtures\TestEntityC();
$testEntityC->setSimpleStringProperty('Christopher');
$testEntityC->setRelatedEntityD($testEntityD);
$testEntityC2 = new Fixtures\TestEntityC();
$testEntityC2->setSimpleStringProperty('Andi');
$testEntityC2->setRelatedEntityD($testEntityD2);
$this->testEntityCDoctrineRepository->add($testEntityC);
$this->testEntityCDoctrineRepository->add($testEntityC2);
$testEntityCIdentifier = $this->persistenceManager->getIdentifierByObject($testEntityC);
$testEntityC2Identifier = $this->persistenceManager->getIdentifierByObject($testEntityC2);
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
$result = $this->testEntityCDoctrineRepository->findAllWithDql();
$this->assertTrue(count($result) === 1);
$this->assertNotNull($this->persistenceManager->getObjectByIdentifier($testEntityCIdentifier, Fixtures\TestEntityC::class));
$this->assertNull($this->persistenceManager->getObjectByIdentifier($testEntityC2Identifier, Fixtures\TestEntityC::class));
$this->restrictableEntityDoctrineRepository->removeAll();
$this->persistenceManager->persistAll();
$this->persistenceManager->clearState();
}