Esempio n. 1
0
 /**
  * @param array $classNames
  * @param bool  $force
  */
 protected function loadFixtures(array $classNames, $force = false)
 {
     if (!$force) {
         $classNames = array_filter($classNames, function ($value) {
             return !in_array($value, self::$loadedFixtures);
         });
         if (!$classNames) {
             return;
         }
     }
     self::$loadedFixtures = array_merge(self::$loadedFixtures, $classNames);
     $loader = $this->getFixtureLoader($classNames);
     $fixtures = array_values($loader->getFixtures());
     $em = $this->getContainer()->get('doctrine.orm.entity_manager');
     $executor = new ORMExecutor($em, new ORMPurger($em));
     $executor->execute($fixtures, true);
     self::$referenceRepository = $executor->getReferenceRepository();
     $this->postFixtureLoad();
 }
 /**
  * @param bool $dbIsolation
  */
 public function setIsolation($dbIsolation = false)
 {
     self::$db_isolation = $dbIsolation;
 }