Esempio n. 1
0
 public function setUp()
 {
     $this->configure();
     $this->module = $this->getModule('Doctrine');
     $this->module->setConnectionName($con = $this->configuration->req(array('doctrine', 'connectionName')));
     // dsa ist nur für doofe tests die entityManager reset mit leerem Parameter aufrufen
     // hier ist getEntityManager nochmal explizit mit $con
     // erzeuge auf jeden Fall eine neue Instanz eines EntityManagers
     $this->em = $this->module->getEntityManager($con, $reset = TRUE, $resetConnection = TRUE);
     // für nativeDatabaseTest
     $this->configuration->set(array('database'), $this->em->getConnection()->getDatabase());
     $this->sm = $this->em->getConnection()->getSchemaManager();
     /* Datenbank für native Test setzen */
     $this->configuration->setDefault(array('database'), $this->em->getConnection()->getDatabase());
     parent::setUp();
     // $this->fixtures ist schon von nativedatabasetest belegt
     $this->dcFixtures = new \Psc\Doctrine\FixturesManager($this->em);
     $this->setUpFixtures();
 }