diff --git a/tests/DoctrineTest/Doctrine_UnitTestCase.php b/tests/DoctrineTest/Doctrine_UnitTestCase.php index 4657c7ba7..c9b891c0e 100644 --- a/tests/DoctrineTest/Doctrine_UnitTestCase.php +++ b/tests/DoctrineTest/Doctrine_UnitTestCase.php @@ -228,12 +228,7 @@ public function prepareTables() { } } - foreach ($this->tables as $table) { - try { - $this->conn->export->exportClasses(array($table)); - } catch (Doctrine_Export_Exception $e) { - } - } + $this->conn->export->exportClasses($this->tables); $this->objTable = $this->connection->getTable('User'); } @@ -319,6 +314,12 @@ protected function openAndBindMysqlConnection() $this->dbh = new PDO(getenv('MYSQL_DSN')); $this->conn = $this->connection = $this->openAdditionalConnection($this->dbh); + + $this->exc = new Doctrine_Connection_Mysql_Exception(); + + $this->unitOfWork = $this->connection->unitOfWork; + $this->connection->setListener(new Doctrine_EventListener()); + $this->query = new Doctrine_Query($this->connection); } protected function openAdditionalConnection($adapter = null, $name = null) diff --git a/tests/MigrationTestCase.php b/tests/MigrationTestCase.php index 4bb3dbe91..31641d7dd 100644 --- a/tests/MigrationTestCase.php +++ b/tests/MigrationTestCase.php @@ -32,13 +32,11 @@ */ class Doctrine_Migration_TestCase extends Doctrine_UnitTestCase { - public function prepareTables() - { - $this->tables[] = 'MigrationPhonenumber'; - $this->tables[] = 'MigrationUser'; - $this->tables[] = 'MigrationProfile'; - parent::prepareTables(); - } + protected $tables = array( + 'MigrationPhonenumber', + 'MigrationUser', + 'MigrationProfile', + ); public function testMigration() {