Exemplo n.º 1
0
 public function tearDown()
 {
     if ($this->_em) {
         $this->_em->getConfiguration()->setEntityNamespaces(array());
     }
     parent::tearDown();
 }
Exemplo n.º 2
0
 public function tearDown()
 {
     parent::tearDown();
     $class = $this->_em->getClassMetadata('Doctrine\\Tests\\Models\\CMS\\CmsUser');
     $class->associationMappings['groups']['fetch'] = ClassMetadataInfo::FETCH_LAZY;
     $class->associationMappings['articles']['fetch'] = ClassMetadataInfo::FETCH_LAZY;
 }
 /**
  * {@inheritdoc}
  */
 protected function tearDown()
 {
     parent::tearDown();
     $connection = $this->_em->getConnection();
     $platform = $connection->getDatabasePlatform();
     // drop sequence manually due to dependency
     $connection->exec($platform->getDropSequenceSQL(new Sequence($platform->getIdentitySequenceName('seq_identity', 'id'))));
 }
Exemplo n.º 4
0
 public function tearDown()
 {
     parent::tearDown();
     $class = $this->_em->getClassMetadata('Doctrine\\Tests\\Models\\Legacy\\LegacyUser');
     $class->associationMappings['_articles']['fetch'] = ClassMetadataInfo::FETCH_LAZY;
     $class->associationMappings['_references']['fetch'] = ClassMetadataInfo::FETCH_LAZY;
     $class->associationMappings['_cars']['fetch'] = ClassMetadataInfo::FETCH_LAZY;
 }
 protected function tearDown()
 {
     parent::tearDown();
     $conn = static::$_sharedConn;
     $this->_sqlLoggerStack->enabled = false;
     //        $conn->executeUpdate('DELETE FROM Media_Audio');
     //        $conn->executeUpdate('DELETE FROM Media_Video');
     $this->_em->clear();
 }
Exemplo n.º 6
0
 protected function tearDown()
 {
     parent::tearDown();
     $conn = static::$_sharedConn;
     $this->_sqlLoggerStack->enabled = false;
     $conn->executeUpdate('DELETE FROM ApproxDateEntity');
     $conn->executeUpdate('DELETE FROM GenderEntity');
     $this->_em->clear();
 }
 /**
  * @inheritdoc
  */
 public function tearDown()
 {
     $dirs = array();
     $ri = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($this->path));
     foreach ($ri as $file) {
         /* @var $file \SplFileInfo */
         if ($file->isFile()) {
             \unlink($file->getPathname());
         } elseif ($file->getBasename() === '.') {
             $dirs[] = $file->getRealpath();
         }
     }
     arsort($dirs);
     foreach ($dirs as $dir) {
         \rmdir($dir);
     }
     parent::tearDown();
 }
Exemplo n.º 8
0
 public function tearDown()
 {
     $this->_em->getMetadataFactory()->setMetadataFor('Doctrine\\Tests\\Models\\Company\\CompanyEmployee', $this->oldMetadata);
     parent::tearDown();
 }
Exemplo n.º 9
0
 /**
  * @throws UnsupportedPlatformException
  */
 protected function tearDown()
 {
     parent::tearDown();
     $this->_sqlLoggerStack->enabled = false;
     $this->tearDownCommonEntities();
     switch ($this->platformName) {
         case 'postgresql':
             $this->tearDownPostgreSql();
             break;
         case 'mysql':
             break;
         default:
             throw UnsupportedPlatformException::unsupportedPlatform($this->platformName);
             break;
     }
     $this->_em->clear();
 }
 protected function tearDown()
 {
     parent::tearDown();
     // drop sequence manually due to dependency
     $this->_em->getConnection()->exec('DROP SEQUENCE postgresqlidentityentity_id_seq CASCADE');
 }
Exemplo n.º 11
0
 protected function tearDown()
 {
     parent::tearDown();
     $this->_schemaTool->dropSchema(array($this->_em->getClassMetadata(self::CLASS_NAME)));
 }