/** * If any of our elements are not a CREATE statement we want to throw * an exception. * */ function testRetrieveSQLSchemaIfNoCREATEInResultsThrowsException() { $this->markTestIncomplete('Need to find a site with pre\'s to test this or refactor search pattern out of code.'); $this->setExpectedException('Zend_Exception'); $this->_dynamicDB->retrieveSQLSchema('http://justanother.url'); }
/** * Runs each of the schemas stored by PHPUnit_Fixture_DynamicDB * * Primarily used to generate our staging DB structure, ready for * integration, functionality & acceptance testing. * * @access public * @param PHPUnit_Fixture_DynamicDB $fixture * @return bool True if sucessful, false otherwise. * */ public function buildSchema($fixture) { if (!$fixture instanceof PHPUnit_Fixture_DynamicDB) { throw new ErrorException('Fixture must extend PHPUnit_Fixture_DynamicDB.'); } $schemas = $fixture->getSchemas(); if (0 === count($schemas)) { throw new Zend_Exception('No schema found.'); } try { foreach ($schemas as $sql) { echo $sql; $this->_runFixtureQuery($sql); } return true; } catch (Exception $e) { $e->getMessage(); $fixture->drop(); } return false; }
function __construct($env) { parent::__construct($env); }
/** * Drops all test data DB's when object is destructed. * Used to keep our DB in its original format. * * @access public * */ public function __destruct() { parent::__destruct(); }