From 3ab687043e57130cbee76ead4ad7865478da718b Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 14 Mar 2010 19:27:36 -0400 Subject: [PATCH] Updating DboPostgres test to reflect changes in test suite. --- .../datasources/dbo/dbo_postgres.test.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index e7d2de63011..bfd375d7739 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -157,7 +157,8 @@ class DboPostgresTest extends CakeTestCase { * @access public */ var $fixtures = array('core.user', 'core.binary_test', 'core.comment', 'core.article', - 'core.tag', 'core.articles_tag', 'core.attachment', 'core.person', 'core.post', 'core.author'); + 'core.tag', 'core.articles_tag', 'core.attachment', 'core.person', 'core.post', 'core.author', + ); /** * Actual DB connection used in testing * @@ -477,16 +478,23 @@ function testCakeSchema() { )'); $model =& ClassRegistry::init('datatypes'); $schema = new CakeSchema(array('connection' => 'test_suite')); - $result = $schema->read(array('connection' => 'test_suite')); - $schema->tables = $result['tables']['missing']; + $result = $schema->read(array( + 'connection' => 'test_suite', + 'models' => array('Datatype') + )); + $schema->tables = array('datatypes' => $result['tables']['datatypes']); $result = $db1->createSchema($schema, 'datatypes'); $this->assertNoPattern('/timestamp DEFAULT/', $result); $this->assertPattern('/timestamp\s*,/', $result); $db1->query('DROP TABLE ' . $db1->fullTableName('datatypes')); + $db1->query($result); - $result2 = $schema->read(array('connection' => 'test_suite')); - $schema->tables = $result2['tables']['missing']; + $result2 = $schema->read(array( + 'connection' => 'test_suite', + 'models' => array('Datatype') + )); + $schema->tables = array('datatypes' => $result2['tables']['datatypes']); $result2 = $db1->createSchema($schema, 'datatypes'); $this->assertEqual($result, $result2);