/**
  * @iterations 100
  */
 public function complexEntityWithExplicitAssociationDefinition()
 {
     $infrastructure = ORMInfrastructure::createOnlyFor(array('\\Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\ChainReferenceEntity', '\\Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\TestEntityWithDependency', '\\Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\ReferencedEntity'));
     $infrastructure->getEntityManager();
 }
 /**
  * Ensures that it is not possible to retrieve the class names of entities,
  * which are not simulated by the infrastructure.
  *
  * If not handled properly, the metadata provides access to several entity classes.
  */
 public function testNotSimulatedEntitiesAreNotExposed()
 {
     $infrastructure = ORMInfrastructure::createOnlyFor(array('\\Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\TestEntity'));
     $metadata = $infrastructure->getEntityManager()->getMetadataFactory()->getAllMetadata();
     $entities = array_map(function (ClassMetadataInfo $info) {
         return ltrim($info->name, '\\');
     }, $metadata);
     $this->assertEquals(array('Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\TestEntity'), $entities);
 }
 /**
  * Prepares the environment before each iteration.
  */
 protected function setUp()
 {
     parent::setUp();
     $this->infrastructure = ORMInfrastructure::createOnlyFor('\\Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\TestEntity');
 }