From 49053d654f3072d97db2f5d78094e4b742443014 Mon Sep 17 00:00:00 2001 From: jackbravo Date: Tue, 4 Sep 2007 15:11:49 +0000 Subject: [PATCH] Table name may be different than just tablelize class name For example, for class User, the table name is entity --- tests/UnitTestCase.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/UnitTestCase.php b/tests/UnitTestCase.php index ee5f1025c..627ca16d2 100644 --- a/tests/UnitTestCase.php +++ b/tests/UnitTestCase.php @@ -180,7 +180,9 @@ class Doctrine_UnitTestCase extends UnitTestCase } public function prepareTables() { foreach($this->tables as $name) { - $query = 'DROP TABLE ' . Doctrine::tableize($name); + $name = ucwords($name); + $table = $this->connection->getTable($name); + $query = 'DROP TABLE ' . $table->getTableName(); try { $this->conn->exec($query); } catch(Doctrine_Connection_Exception $e) {