diff --git a/cake/tests/cases/libs/controller/component.test.php b/cake/tests/cases/libs/controller/component.test.php index e3f78b28c..8ab7227c2 100644 --- a/cake/tests/cases/libs/controller/component.test.php +++ b/cake/tests/cases/libs/controller/component.test.php @@ -353,6 +353,7 @@ class ComponentTest extends CakeTestCase { function testNestedComponentLoading() { $Controller =& new ComponentTestController(); $Controller->components = array('Apple'); + $Controller->uses = false; $Controller->constructClasses(); $Controller->Component->initialize($Controller); @@ -372,6 +373,7 @@ class ComponentTest extends CakeTestCase { function testComponentStartup() { $Controller =& new ComponentTestController(); $Controller->components = array('Apple'); + $Controller->uses = false; $Controller->constructClasses(); $Controller->Component->initialize($Controller); $Controller->beforeFilter(); @@ -391,6 +393,7 @@ class ComponentTest extends CakeTestCase { */ function testMultipleComponentInitialize() { $Controller =& new ComponentTestController(); + $Controller->uses = false; $Controller->components = array('Orange', 'Banana'); $Controller->constructClasses(); $Controller->Component->initialize($Controller); @@ -411,7 +414,7 @@ class ComponentTest extends CakeTestCase { $Controller =& new ComponentTestController(); $Controller->components = array('ParamTest' => array('test' => 'value', 'flag'), 'Apple'); - + $Controller->uses = false; $Controller->constructClasses(); $Controller->Component->initialize($Controller); @@ -443,8 +446,12 @@ class ComponentTest extends CakeTestCase { * @return void **/ function testComponentParamsNoDuplication() { + if ($this->skipIf(defined('APP_CONTROLLER_EXISTS'), '%s Need a non-existent AppController')) { + return; + } $Controller =& new ComponentTestController(); $Controller->components = array('Orange' => array('setting' => array('itemx'))); + $Controller->uses = false; $Controller->constructClasses(); $Controller->Component->initialize($Controller); @@ -459,6 +466,7 @@ class ComponentTest extends CakeTestCase { function testMutuallyReferencingComponents() { $Controller =& new ComponentTestController(); $Controller->components = array('MutuallyReferencingOne'); + $Controller->uses = false; $Controller->constructClasses(); $Controller->Component->initialize($Controller); @@ -483,6 +491,7 @@ class ComponentTest extends CakeTestCase { function testSomethingReferencingEmailComponent() { $Controller =& new ComponentTestController(); $Controller->components = array('SomethingWithEmail'); + $Controller->uses = false; $Controller->constructClasses(); $Controller->Component->initialize($Controller); $Controller->beforeFilter(); @@ -508,14 +517,17 @@ class ComponentTest extends CakeTestCase { * @access public */ function testDoubleLoadingOfSessionComponent() { - $this->skipIf(defined('APP_CONTROLLER_EXISTS'), '%s Need a non-existent AppController'); + if ($this->skipIf(defined('APP_CONTROLLER_EXISTS'), '%s Need a non-existent AppController')) { + return; + } $Controller =& new ComponentTestController(); - $Controller->uses = array(); + $Controller->uses = false; $Controller->components = array('Session'); $Controller->constructClasses(); $this->assertEqual($Controller->components, array('Session' => '', 'Orange' => array('colour' => 'blood orange'))); } + } ?> \ No newline at end of file diff --git a/cake/tests/groups/controller.group.php b/cake/tests/groups/controller.group.php index a76073c2a..2a4dcbe80 100644 --- a/cake/tests/groups/controller.group.php +++ b/cake/tests/groups/controller.group.php @@ -37,7 +37,7 @@ class ControllerGroupTest extends GroupTest { * @var string 'All cake/libs/controller/* (Not yet implemented)' * @access public */ - var $label = 'All Controllers and Components'; + var $label = 'Component, Controllers, Scaffold test cases.'; /** * LibControllerGroupTest method * @@ -45,7 +45,10 @@ class ControllerGroupTest extends GroupTest { * @return void */ function ControllerGroupTest() { - TestManager::addTestCasesFromDirectory($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller'); + TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'controller'); + TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'scaffold'); + TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'pages_controller'); + TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'controller' . DS . 'component'); } } ?>