public function setUp() { parent::setUp(); if (!function_exists('gd_info')) { $this->markTestSkipped('Gd not installed'); } }
public function setUp() { if (!class_exists('Mongo')) { $this->markTestSkipped('Mongo PHP/PECL Extension is not available.'); } if (!class_exists('Doctrine\\Common\\Version')) { $this->markTestSkipped('Doctrine is not available.'); } $this->documentManager = DoctrineMongoTestCase::createTestDocumentManager(); $this->documentManager->createQueryBuilder(self::SINGLE_IDENT_CLASS)->remove()->getQuery()->execute(); parent::setUp(); }
public 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::SINGLE_IDENT_CLASS)); try { $schemaTool->dropSchema($classes); $schemaTool->dropDatabase(); } catch (\Exception $e) { } try { $schemaTool->createSchema($classes); } catch (\Exception $e) { } }