1
0
mirror of synced 2024-12-13 14:56:01 +03:00

Table name may be different than just tablelize class name

For example, for class User, the table name is entity
This commit is contained in:
jackbravo 2007-09-04 15:11:49 +00:00
parent 0de326b577
commit 49053d654f

View File

@ -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) {