Ejemplo n.º 1
0
 /**
  * @return TestEntity
  */
 private function createAndImportFixtureWithTranslation()
 {
     $entity = new TestEntity('english');
     $translation = new TestEntityTranslation('de_DE', 'deutsch', $entity);
     $this->infrastructure->import(array($translation, $entity));
     return $entity;
 }
 /**
  * Ensures that the infrastructure logs queries, which are executed after an import.
  */
 public function testInfrastructureLogsQueriesThatAreExecutedAfterImport()
 {
     $entity = new TestEntity();
     $this->infrastructure->import($entity);
     $repository = $this->infrastructure->getRepository($entity);
     $repository->find(42);
     $queries = $this->infrastructure->getQueries();
     $this->assertInternalType('array', $queries);
     $this->assertCount(1, $queries);
 }
 /**
  * @iterations 200
  */
 public function import100EntitiesReturnedByPhpFile()
 {
     $this->infrastructure->import($this->getImportFilePath('return-100-entities.php'));
 }