/**
  * Imports entities from the provided data source.
  *
  * The supported data sources are documented at \Webfactory\Doctrine\ORMTestInfrastructure\Importer::import().
  *
  * @param mixed $dataSource Callback, single entity, array of entities or file path.
  * @see \Webfactory\Doctrine\ORMTestInfrastructure\Importer::import()
  */
 public function import($dataSource)
 {
     $loggerWasEnabled = $this->queryLogger->enabled;
     $this->queryLogger->enabled = false;
     $importer = new Importer($this->getEntityManager());
     $importer->import($dataSource);
     $this->queryLogger->enabled = $loggerWasEnabled;
 }
 /**
  * Checks if the importer detaches the provided entities.
  */
 public function testImporterDetachesEntities()
 {
     $this->entityManager->expects($this->exactly(2))->method('detach')->with($this->isInstanceOf('\\stdClass'));
     $entities = array(new \stdClass(), new \stdClass());
     $this->importer->import($entities);
 }