From 13a1a6199c51e2dd71f8c9d361e7eca3ff1f4417 Mon Sep 17 00:00:00 2001 From: "Jonathan.Wage" Date: Mon, 24 Sep 2007 22:27:41 +0000 Subject: [PATCH] Fixes for unit tests being broken. --- lib/Doctrine/Export.php | 11 +++++++---- playground/index.php | 2 -- tests/schema.yml | 5 ----- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index b304a4b8b..161008a56 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -1080,12 +1080,15 @@ class Doctrine_Export extends Doctrine_Connection_Module } $table = $plugin->getOption('pluginTable'); + + // Make sure plugin has a valid table + if ($table instanceof Doctrine_Table) { + $data = $table->getExportableFormat(); - $data = $table->getExportableFormat(); + $query = $this->conn->export->createTableSql($data['tableName'], $data['columns'], $data['options']); - $query = $this->conn->export->createTableSql($data['tableName'], $data['columns'], $data['options']); - - $sql = array_merge($sql, (array) $query); + $sql = array_merge($sql, (array) $query); + } } return $sql; diff --git a/playground/index.php b/playground/index.php index a5b220302..d93dac5fc 100644 --- a/playground/index.php +++ b/playground/index.php @@ -24,6 +24,4 @@ if ($action == 'server') { $query = new Doctrine_Resource_Query(); $users = $query->from('User u, u.Phonenumber p, u.Address a, u.Book b, b.Author a')->execute(); - - print_r($users); } \ No newline at end of file diff --git a/tests/schema.yml b/tests/schema.yml index da8da36c2..0900824a0 100644 --- a/tests/schema.yml +++ b/tests/schema.yml @@ -1,9 +1,4 @@ --- -Test: - inheritance: - extends: User - keyField: otype - keyValue: 1 Account: tableName: account className: Account