Permalink
Browse files

Updating DboPostgres test to reflect changes in test suite.

  • Loading branch information...
1 parent 8d58b40 commit 3ab687043e57130cbee76ead4ad7865478da718b @markstory markstory committed Mar 14, 2010
Showing with 13 additions and 5 deletions.
  1. +13 −5 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);

0 comments on commit 3ab6870

Please sign in to comment.