From ab5bfdccfd1cf4dc5ff115a09a83fd40ff48cc74 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 11 Dec 2011 23:20:19 -0500 Subject: [PATCH] Fix bad merge and failing test. --- .../Test/Case/Utility/ClassRegistryTest.php | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php index fc79915b1..773db5364 100644 --- a/lib/Cake/Test/Case/Utility/ClassRegistryTest.php +++ b/lib/Cake/Test/Case/Utility/ClassRegistryTest.php @@ -122,6 +122,20 @@ class RegisterCategory extends ClassRegisterModel { */ public $name = 'RegisterCategory'; } + /** + * RegisterPrefixedDs class + * + * @package Cake.Test.Case.Utility + */ +class RegisterPrefixedDs extends ClassRegisterModel { + +/** + * useDbConfig property + * + * @var string 'doesnotexist' + */ + public $useDbConfig = 'doesnotexist'; +} /** * Abstract class for testing ClassRegistry. @@ -291,17 +305,18 @@ class ClassRegistryTest extends CakeTestCase { * */ public function testPrefixedTestDatasource() { + ClassRegistry::config(array('testing' => true)); $Model = ClassRegistry::init('RegisterPrefixedDs'); - $this->assertEqual($Model->useDbConfig, 'test'); + $this->assertEquals('test', $Model->useDbConfig); ClassRegistry::removeObject('RegisterPrefixedDs'); $testConfig = ConnectionManager::getDataSource('test')->config; ConnectionManager::create('test_doesnotexist', $testConfig); $Model = ClassRegistry::init('RegisterArticle'); - $this->assertEqual($Model->useDbConfig, 'test'); + $this->assertEquals('test', $Model->useDbConfig); $Model = ClassRegistry::init('RegisterPrefixedDs'); - $this->assertEqual($Model->useDbConfig, 'test_doesnotexist'); + $this->assertEquals('test_doesnotexist', $Model->useDbConfig); } /**