Author: jackbravo
Date: 2007-09-04 16:11:49 +0100 (Tue, 04 Sep 2007)
New Revision: 2411
Modified:
trunk/tests/UnitTestCase.php
Log:
Table name may be different than just tablelize class name
For example, for class User, the table name is entity
Modified: trunk/tests/UnitTestCase.php
===================================================================
--- trunk/tests/UnitTestCase.php 2007-09-04 13:22:38 UTC (rev 2410)
+++ trunk/tests/UnitTestCase.php 2007-09-04 15:11:49 UTC (rev 2411)
@@ -180,7 +180,9 @@
}
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) {