From 95f58321a8dfba24dd4e93b1b63a69776bf65140 Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 15 Dec 2010 23:54:28 -0500 Subject: [PATCH] Removing a duplicate test, and extra classes. --- .../cases/libs/controller/component.test.php | 67 +------------------ 1 file changed, 2 insertions(+), 65 deletions(-) diff --git a/cake/tests/cases/libs/controller/component.test.php b/cake/tests/cases/libs/controller/component.test.php index 923e86868..726f3b3ac 100644 --- a/cake/tests/cases/libs/controller/component.test.php +++ b/cake/tests/cases/libs/controller/component.test.php @@ -20,52 +20,6 @@ App::import('Controller', 'Controller', false); App::import('Controller', 'Component', false); -if (!class_exists('AppController')) { - -/** - * AppController class - * - * @package cake - * @subpackage cake.tests.cases.libs.controller - */ - class AppController extends Controller { - -/** - * name property - * - * @var string 'App' - * @access public - */ - public $name = 'App'; - -/** - * uses property - * - * @var array - * @access public - */ - public $uses = array(); - -/** - * helpers property - * - * @var array - * @access public - */ - public $helpers = array(); - -/** - * components property - * - * @var array - * @access public - */ - public $components = array('Orange' => array('colour' => 'blood orange')); - } -} elseif (!defined('APP_CONTROLLER_EXISTS')){ - define('APP_CONTROLLER_EXISTS', true); -} - /** * ParamTestComponent * @@ -115,7 +69,7 @@ class ParamTestComponent extends Component { * @package cake * @subpackage cake.tests.cases.libs.controller */ -class ComponentTestController extends AppController { +class ComponentTestController extends Controller { /** * name property @@ -132,6 +86,7 @@ class ComponentTestController extends AppController { * @access public */ public $uses = array(); + } /** @@ -396,22 +351,4 @@ class ComponentTest extends CakeTestCase { $this->assertType('ComponentTestController', $Controller->SomethingWithEmail->Email->Controller); } -/** - * Test that SessionComponent doesn't get added if its already in the components array. - * - * @return void - */ - public function testDoubleLoadingOfSessionComponent() { - if ($this->skipIf(defined('APP_CONTROLLER_EXISTS'), '%s Need a non-existent AppController')) { - return; - } - - $Controller = new ComponentTestController(); - $Controller->uses = false; - $Controller->components = array('Session'); - $Controller->constructClasses(); - - $this->assertEqual($Controller->components, array('Session' => '', 'Orange' => array('colour' => 'blood orange'))); - } - }