/** * Checks if the automatic dependency setup can cope with chained references. * * Example: * * A -> B -> C * * A references B, B references C. A is not directly related to C. */ public function testAutomaticDependencyDetectionCanHandleChainedRelations() { $infrastructure = ORMInfrastructure::createWithDependenciesFor(array('\\Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\ChainReferenceEntity')); $entityWithReferenceChain = new ChainReferenceEntity(); // All tables must be created properly, otherwise it is not possible to store the entity. $this->setExpectedException(null); $infrastructure->getEntityManager()->persist($entityWithReferenceChain); $infrastructure->getEntityManager()->flush(); }
/** * @iterations 100 */ public function complexEntityWithAssociationDetection() { $infrastructure = ORMInfrastructure::createWithDependenciesFor('\\Webfactory\\Doctrine\\ORMTestInfrastructure\\ORMInfrastructureTest\\ChainReferenceEntity'); $infrastructure->getEntityManager(); }