protected function setUp() { if (!class_exists('Doctrine\\Common\\Version')) { $this->markTestSkipped('Doctrine is not available.'); } $this->em = DoctrineOrmTestCase::createTestEntityManager(); parent::setUp(); $schemaTool = new SchemaTool($this->em); $classes = array( $this->em->getClassMetadata(self::ITEM_GROUP_CLASS), $this->em->getClassMetadata(self::SINGLE_IDENT_CLASS), $this->em->getClassMetadata(self::SINGLE_STRING_IDENT_CLASS), $this->em->getClassMetadata(self::COMPOSITE_IDENT_CLASS), $this->em->getClassMetadata(self::COMPOSITE_STRING_IDENT_CLASS), ); try { $schemaTool->dropSchema($classes); } catch(\Exception $e) { } try { $schemaTool->createSchema($classes); } catch(\Exception $e) { } }
protected function tearDown() { parent::tearDown(); $this->em = null; }