From 842fee428ead04ec2ab6da330fcdbf65d40e6bfe Mon Sep 17 00:00:00 2001 From: doctrine Date: Sat, 15 Apr 2006 20:52:23 +0000 Subject: [PATCH] One-Table-One-Class inheritance fix --- classes/Table.class.php | 4 +++- tests/run.php | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/classes/Table.class.php b/classes/Table.class.php index 4155546a0..4ff69e85f 100644 --- a/classes/Table.class.php +++ b/classes/Table.class.php @@ -143,9 +143,11 @@ class Doctrine_Table extends Doctrine_Configurable { $record->setTableDefinition(); if(isset($this->columns)) { - $method = new ReflectionMethod($name,"setTableDefinition"); + $method = new ReflectionMethod($this->name,"setTableDefinition"); $class = $method->getDeclaringClass(); + print $class->getName(); + if( ! isset($this->tableName)) $this->tableName = strtolower($class->getName()); diff --git a/tests/run.php b/tests/run.php index b6c03dd68..95c50f979 100644 --- a/tests/run.php +++ b/tests/run.php @@ -23,7 +23,7 @@ $test = new GroupTest("Doctrine Framework Unit Tests"); -/** + $test->addTestCase(new Doctrine_RecordTestCase()); $test->addTestCase(new Doctrine_SessionTestCase()); @@ -36,10 +36,10 @@ $test->addTestCase(new Doctrine_AccessTestCase()); $test->addTestCase(new Doctrine_ConfigurableTestCase()); $test->addTestCase(new Doctrine_EventListenerTestCase()); -*/ + $test->addTestCase(new Doctrine_DQL_ParserTestCase()); -//$test->addTestCase(new Doctrine_BatchIteratorTestCase()); +$test->addTestCase(new Doctrine_BatchIteratorTestCase()); //$test->addTestCase(new Doctrine_Cache_FileTestCase()); //$test->addTestCase(new Doctrine_Cache_SqliteTestCase());