Skip to content
This repository
Browse code

Removing a duplicate test, and extra classes.

  • Loading branch information...
commit 95f58321a8dfba24dd4e93b1b63a69776bf65140 1 parent 339cb41
Mark Story authored December 15, 2010
67  cake/tests/cases/libs/controller/component.test.php
@@ -20,52 +20,6 @@
20 20
 App::import('Controller', 'Controller', false);
21 21
 App::import('Controller', 'Component', false);
22 22
 
23  
-if (!class_exists('AppController')) {
24  
-
25  
-/**
26  
- * AppController class
27  
- *
28  
- * @package       cake
29  
- * @subpackage    cake.tests.cases.libs.controller
30  
- */
31  
-	class AppController extends Controller {
32  
-
33  
-/**
34  
- * name property
35  
- *
36  
- * @var string 'App'
37  
- * @access public
38  
- */
39  
-		public $name = 'App';
40  
-
41  
-/**
42  
- * uses property
43  
- *
44  
- * @var array
45  
- * @access public
46  
- */
47  
-		public $uses = array();
48  
-
49  
-/**
50  
- * helpers property
51  
- *
52  
- * @var array
53  
- * @access public
54  
- */
55  
-		public $helpers = array();
56  
-
57  
-/**
58  
- * components property
59  
- *
60  
- * @var array
61  
- * @access public
62  
- */
63  
-		public $components = array('Orange' => array('colour' => 'blood orange'));
64  
-	}
65  
-} elseif (!defined('APP_CONTROLLER_EXISTS')){
66  
-	define('APP_CONTROLLER_EXISTS', true);
67  
-}
68  
-
69 23
 /**
70 24
  * ParamTestComponent
71 25
  *
@@ -115,7 +69,7 @@ function initialize(&$controller, $settings) {
115 69
  * @package       cake
116 70
  * @subpackage    cake.tests.cases.libs.controller
117 71
  */
118  
-class ComponentTestController extends AppController {
  72
+class ComponentTestController extends Controller {
119 73
 
120 74
 /**
121 75
  * name property
@@ -132,6 +86,7 @@ class ComponentTestController extends AppController {
132 86
  * @access public
133 87
  */
134 88
 	public $uses = array();
  89
+
135 90
 }
136 91
 
137 92
 /**
@@ -396,22 +351,4 @@ function testSomethingReferencingEmailComponent() {
396 351
 		$this->assertType('ComponentTestController', $Controller->SomethingWithEmail->Email->Controller);
397 352
 	}
398 353
 
399  
-/**
400  
- * Test that SessionComponent doesn't get added if its already in the components array.
401  
- *
402  
- * @return void
403  
- */
404  
-	public function testDoubleLoadingOfSessionComponent() {
405  
-		if ($this->skipIf(defined('APP_CONTROLLER_EXISTS'), '%s Need a non-existent AppController')) {
406  
-			return;
407  
-		}
408  
-
409  
-		$Controller = new ComponentTestController();
410  
-		$Controller->uses = false;
411  
-		$Controller->components = array('Session');
412  
-		$Controller->constructClasses();
413  
-
414  
-		$this->assertEqual($Controller->components, array('Session' => '', 'Orange' => array('colour' => 'blood orange')));
415  
-	}
416  
-
417 354
 }

0 notes on commit 95f5832

Please sign in to comment.
Something went wrong with that request. Please try again.