From d77f9aacdeb3fd760428b0de8378960a638b3239 Mon Sep 17 00:00:00 2001 From: Rachman Chavik Date: Tue, 13 Dec 2011 21:10:16 +0700 Subject: [PATCH] updating multidb tests to use ConnectionManager --- lib/Cake/Test/Case/Model/ModelIntegrationTest.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php index 70d6ea599a1..1aef7c3c155 100644 --- a/lib/Cake/Test/Case/Model/ModelIntegrationTest.php +++ b/lib/Cake/Test/Case/Model/ModelIntegrationTest.php @@ -281,9 +281,9 @@ function testFindWithJoinsOption() { * or one connection will step on the other. */ public function testCrossDatabaseJoins() { - $config = new DATABASE_CONFIG(); + $config = ConnectionManager::enumConnectionObjects(); - $skip = (!isset($config->test) || !isset($config->test2)); + $skip = (!isset($config['test']) || !isset($config['test2'])); if ($skip) { $this->markTestSkipped('Primary and secondary test databases not configured, skipping cross-database join tests. To run theses tests defined $test and $test2 in your database configuration.' @@ -2234,9 +2234,9 @@ public function testHasMethod() { */ public function testMultischemaFixture() { - $config = new DATABASE_CONFIG(); + $config = ConnectionManager::enumConnectionObjects(); $this->skipIf($this->db instanceof Sqlite, 'This test is not compatible with Sqlite.'); - $this->skipIf(!isset($config->test) || !isset($config->test2), + $this->skipIf(!isset($config['test']) || !isset($config['test2']), 'Primary and secondary test databases not configured, skipping cross-database join tests. To run these tests define $test and $test2 in your database configuration.' ); @@ -2264,10 +2264,10 @@ public function testMultischemaFixture() { */ public function testMultischemaFixtureWithThreeDatabases() { - $config = new DATABASE_CONFIG(); + $config = ConnectionManager::enumConnectionObjects(); $this->skipIf($this->db instanceof Sqlite, 'This test is not compatible with Sqlite.'); $this->skipIf( - !isset($config->test) || !isset($config->test2) || !isset($config->test_database_three), + !isset($config['test']) || !isset($config['test2']) || !isset($config['test_database_three']), 'Primary, secondary, and tertiary test databases not configured, skipping test. To run this test define $test, $test2, and $test_database_three in your database configuration.' );