Skip to content
This repository
Browse code

Use App::RESET instead of true with App::build()

  • Loading branch information...
commit c4829dc3b86bda5bd501bef0881ad08d80e8de8b 1 parent 6684b77
Kyle Robinson Young authored February 18, 2012

Showing 26 changed files with 42 additions and 40 deletions. Show diff stats Hide diff stats

  1. 6  lib/Cake/Test/Case/Cache/CacheTest.php
  2. 2  lib/Cake/Test/Case/Configure/PhpReaderTest.php
  3. 2  lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
  4. 2  lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
  5. 2  lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
  6. 2  lib/Cake/Test/Case/Console/ShellDispatcherTest.php
  7. 2  lib/Cake/Test/Case/Console/ShellTest.php
  8. 2  lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticateTest.php
  9. 4  lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
  10. 2  lib/Cake/Test/Case/Controller/ControllerTest.php
  11. 2  lib/Cake/Test/Case/Core/CakePluginTest.php
  12. 4  lib/Cake/Test/Case/Core/ConfigureTest.php
  13. 6  lib/Cake/Test/Case/Core/ObjectTest.php
  14. 4  lib/Cake/Test/Case/Error/ErrorHandlerTest.php
  15. 2  lib/Cake/Test/Case/Error/ExceptionRendererTest.php
  16. 2  lib/Cake/Test/Case/I18n/I18nTest.php
  17. 2  lib/Cake/Test/Case/Log/CakeLogTest.php
  18. 4  lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
  19. 6  lib/Cake/Test/Case/Routing/DispatcherTest.php
  20. 4  lib/Cake/Test/Case/Routing/RouterTest.php
  21. 4  lib/Cake/Test/Case/Utility/CakeTimeTest.php
  22. 2  lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
  23. 4  lib/Cake/Test/Case/View/Helper/NumberHelperTest.php
  24. 4  lib/Cake/Test/Case/View/Helper/TextHelperTest.php
  25. 4  lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
  26. 2  lib/Cake/Test/Case/View/ViewTest.php
6  lib/Cake/Test/Case/Cache/CacheTest.php
@@ -88,7 +88,7 @@ public function testConfigWithLibAndPluginEngines() {
88 88
 		App::build(array(
89 89
 			'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
90 90
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
91  
-		), true);
  91
+		), App::RESET);
92 92
 		CakePlugin::load('TestPlugin');
93 93
 
94 94
 		$settings = array('engine' => 'TestAppCache', 'path' => TMP, 'prefix' => 'cake_test_');
@@ -260,7 +260,7 @@ public function testDrop() {
260 260
 		App::build(array(
261 261
 			'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
262 262
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
263  
-		), true);
  263
+		), App::RESET);
264 264
 
265 265
 		$result = Cache::drop('some_config_that_does_not_exist');
266 266
 		$this->assertFalse($result);
@@ -312,7 +312,7 @@ public function testWriteTriggerError() {
312 312
 		App::build(array(
313 313
 			'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
314 314
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
315  
-		), true);
  315
+		), App::RESET);
316 316
 
317 317
 		Cache::config('test_trigger', array('engine' => 'TestAppCache', 'prefix' => ''));
318 318
 		try {
2  lib/Cake/Test/Case/Configure/PhpReaderTest.php
@@ -85,7 +85,7 @@ public function testReadWithDots() {
85 85
 	public function testReadPluginValue() {
86 86
 		App::build(array(
87 87
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
88  
-		), true);
  88
+		), App::RESET);
89 89
 		CakePlugin::load('TestPlugin');
90 90
 		$reader = new PhpReader($this->path);
91 91
 		$result = $reader->read('TestPlugin.load');
2  lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
@@ -46,7 +46,7 @@ public function setUp() {
46 46
 			'Console/Command' => array(
47 47
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
48 48
 			)
49  
-		), true);
  49
+		), App::RESET);
50 50
 		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
51 51
 
52 52
 		$out = new TestStringOutput();
2  lib/Cake/Test/Case/Console/Command/SchemaShellTest.php
@@ -336,7 +336,7 @@ public function testGenerateOverwrite() {
336 336
 	public function testGenerateWithPlugins() {
337 337
 		App::build(array(
338 338
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
339  
-		), true);
  339
+		), App::RESET);
340 340
 		CakePlugin::load('TestPlugin');
341 341
 
342 342
 		$this->db->cacheSources = false;
2  lib/Cake/Test/Case/Console/Command/Task/TestTaskTest.php
@@ -573,7 +573,7 @@ public function testInteractiveWithPlugin() {
573 573
 		$testApp = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS;
574 574
 		App::build(array(
575 575
 			'plugins' => array($testApp)
576  
-		), true);
  576
+		), App::RESET);
577 577
 		CakePlugin::load('TestPlugin');
578 578
 
579 579
 		$this->Task->plugin = 'TestPlugin';
2  lib/Cake/Test/Case/Console/ShellDispatcherTest.php
@@ -119,7 +119,7 @@ public function setUp() {
119 119
 			'Console/Command' => array(
120 120
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
121 121
 			)
122  
-		), true);
  122
+		), App::RESET);
123 123
 		CakePlugin::load('TestPlugin');
124 124
 	}
125 125
 
2  lib/Cake/Test/Case/Console/ShellTest.php
@@ -173,7 +173,7 @@ public function testInitialize() {
173 173
 		App::build(array(
174 174
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
175 175
 			'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS)
176  
-		), true);
  176
+		), App::RESET);
177 177
 
178 178
 		CakePlugin::load('TestPlugin');
179 179
 		$this->Shell->uses = array('TestPlugin.TestPluginPost');
2  lib/Cake/Test/Case/Controller/Component/Auth/FormAuthenticateTest.php
@@ -160,7 +160,7 @@ public function testPluginModel() {
160 160
 		Cache::delete('object_map', '_cake_core_');
161 161
 		App::build(array(
162 162
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
163  
-		), true);
  163
+		), App::RESET);
164 164
 		CakePlugin::load('TestPlugin');
165 165
 
166 166
 		$ts = date('Y-m-d H:i:s');
4  lib/Cake/Test/Case/Controller/Component/RequestHandlerComponentTest.php
@@ -712,7 +712,7 @@ public function testClientProperties() {
712 712
 	public function testAjaxRedirectAsRequestAction() {
713 713
 		App::build(array(
714 714
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
715  
-		), true);
  715
+		), App::RESET);
716 716
 
717 717
 		$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
718 718
 		$this->Controller->request = $this->getMock('CakeRequest');
@@ -741,7 +741,7 @@ public function testAjaxRedirectAsRequestAction() {
741 741
 	public function testAjaxRedirectAsRequestActionStillRenderingLayout() {
742 742
 		App::build(array(
743 743
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
744  
-		), true);
  744
+		), App::RESET);
745 745
 
746 746
 		$this->Controller->RequestHandler = $this->getMock('RequestHandlerComponent', array('_stop'), array(&$this->Controller->Components));
747 747
 		$this->Controller->request = $this->getMock('CakeRequest');
2  lib/Cake/Test/Case/Controller/ControllerTest.php
@@ -624,7 +624,7 @@ public function testControllerSet() {
624 624
 	public function testRender() {
625 625
 		App::build(array(
626 626
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
627  
-		), true);
  627
+		), App::RESET);
628 628
 		ClassRegistry::flush();
629 629
 		$request = new CakeRequest('controller_posts/index');
630 630
 		$request->params['action'] = 'index';
2  lib/Cake/Test/Case/Core/CakePluginTest.php
@@ -33,7 +33,7 @@ class CakePluginTest extends CakeTestCase {
33 33
 	public function setUp() {
34 34
 		App::build(array(
35 35
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
36  
-		), true);
  36
+		), App::RESET);
37 37
 		App::objects('plugins', null, false);
38 38
 	}
39 39
 
4  lib/Cake/Test/Case/Core/ConfigureTest.php
@@ -255,7 +255,9 @@ public function testLoadNoMerge() {
255 255
  * @return void
256 256
  */
257 257
 	public function testLoadPlugin() {
258  
-		App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)), true);
  258
+		App::build(array(
  259
+			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
  260
+		), App::RESET);
259 261
 		Configure::config('test', new PhpReader());
260 262
 		CakePlugin::load('TestPlugin');
261 263
 		$result = Configure::load('TestPlugin.load', 'test');
6  lib/Cake/Test/Case/Core/ObjectTest.php
@@ -449,7 +449,7 @@ public function testRequestAction() {
449 449
 			'models' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
450 450
 			'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
451 451
 			'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS)
452  
-		), true);
  452
+		), App::RESET);
453 453
 		$this->assertNull(Router::getRequest(), 'request stack should be empty.');
454 454
 
455 455
 		$result = $this->object->requestAction('');
@@ -489,7 +489,7 @@ public function testRequestAction() {
489 489
 	public function testRequestActionPlugins() {
490 490
 		App::build(array(
491 491
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
492  
-		), true);
  492
+		), App::RESET);
493 493
 		CakePlugin::load('TestPlugin');
494 494
 		Router::reload();
495 495
 
@@ -529,7 +529,7 @@ public function testRequestActionArray() {
529 529
 			'views' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
530 530
 			'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
531 531
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS)
532  
-		), true);
  532
+		), App::RESET);
533 533
 		CakePlugin::load(array('TestPlugin'));
534 534
 
535 535
 		$result = $this->object->requestAction(
4  lib/Cake/Test/Case/Error/ErrorHandlerTest.php
@@ -41,7 +41,7 @@ public function setUp() {
41 41
 			'View' => array(
42 42
 				CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
43 43
 			)
44  
-		), true);
  44
+		), App::RESET);
45 45
 		Router::reload();
46 46
 
47 47
 		$request = new CakeRequest(null, false);
@@ -232,7 +232,7 @@ public function testLoadPluginHanlder() {
232 232
 			'plugins' => array(
233 233
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
234 234
 			)
235  
-		), true);
  235
+		), App::RESET);
236 236
 		CakePlugin::load('TestPlugin');
237 237
 		Configure::write('Exception.renderer', 'TestPlugin.TestPluginExceptionRenderer');
238 238
 		$error = new NotFoundException('Kaboom!');
2  lib/Cake/Test/Case/Error/ExceptionRendererTest.php
@@ -155,7 +155,7 @@ public function setUp() {
155 155
 			'views' => array(
156 156
 				CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS
157 157
 			)
158  
-		), true);
  158
+		), App::RESET);
159 159
 		Router::reload();
160 160
 
161 161
 		$request = new CakeRequest(null, false);
2  lib/Cake/Test/Case/I18n/I18nTest.php
@@ -35,7 +35,7 @@ public function setUp() {
35 35
 		App::build(array(
36 36
 			'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS),
37 37
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
38  
-		), true);
  38
+		), App::RESET);
39 39
 		CakePlugin::load(array('TestPlugin'));
40 40
 	}
41 41
 
2  lib/Cake/Test/Case/Log/CakeLogTest.php
@@ -49,7 +49,7 @@ public function testImportingLoggers() {
49 49
 		App::build(array(
50 50
 			'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
51 51
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
52  
-		), true);
  52
+		), App::RESET);
53 53
 		CakePlugin::load('TestPlugin');
54 54
 
55 55
 		$result = CakeLog::config('libtest', array(
4  lib/Cake/Test/Case/Model/Datasource/CakeSessionTest.php
@@ -504,7 +504,7 @@ public function testUsingAppLibsHandler() {
504 504
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS
505 505
 			),
506 506
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
507  
-		), true);
  507
+		), App::RESET);
508 508
 		Configure::write('Session', array(
509 509
 			'defaults' => 'cake',
510 510
 			'handler' => array(
@@ -525,7 +525,7 @@ public function testUsingAppLibsHandler() {
525 525
 	public function testUsingPluginHandler() {
526 526
 		App::build(array(
527 527
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
528  
-		), true);
  528
+		), App::RESET);
529 529
 		CakePlugin::load('TestPlugin');
530 530
 
531 531
 		Configure::write('Session', array(
6  lib/Cake/Test/Case/Routing/DispatcherTest.php
@@ -1038,7 +1038,7 @@ public function testPluginShortCutUrlsWithControllerThatNeedsToBeLoaded() {
1038 1038
 		Router::reload();
1039 1039
 		App::build(array(
1040 1040
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
1041  
-		), true);
  1041
+		), App::RESET);
1042 1042
 		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
1043 1043
 
1044 1044
 		$Dispatcher = new TestDispatcher();
@@ -1114,7 +1114,7 @@ public function testTestPluginDispatch() {
1114 1114
 		$Dispatcher = new TestDispatcher();
1115 1115
 		App::build(array(
1116 1116
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
1117  
-		), APP::RESET);
  1117
+		), App::RESET);
1118 1118
 		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
1119 1119
 		Router::reload();
1120 1120
 		Router::parse('/');
@@ -1396,7 +1396,7 @@ public function testFullPageCachingDispatch($url) {
1396 1396
 
1397 1397
 		App::build(array(
1398 1398
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
1399  
-		), true);
  1399
+		), App::RESET);
1400 1400
 
1401 1401
 		$dispatcher = new TestDispatcher();
1402 1402
 		$request = new CakeRequest($url);
4  lib/Cake/Test/Case/Routing/RouterTest.php
@@ -1187,7 +1187,7 @@ public function testPrefixRoutingAndPlugins() {
1187 1187
 			'plugins' =>  array(
1188 1188
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
1189 1189
 			)
1190  
-		), true);
  1190
+		), App::RESET);
1191 1191
 		CakePlugin::load(array('TestPlugin'));
1192 1192
 
1193 1193
 		Router::reload();
@@ -2201,7 +2201,7 @@ public function testConnectDefaultRoutes() {
2201 2201
 			'plugins' =>  array(
2202 2202
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
2203 2203
 			)
2204  
-		), true);
  2204
+		), App::RESET);
2205 2205
 		CakePlugin::load(array('TestPlugin', 'PluginJs'));
2206 2206
 		Router::reload();
2207 2207
 		require CAKE . 'Config' . DS . 'routes.php';
4  lib/Cake/Test/Case/Utility/CakeTimeTest.php
@@ -656,7 +656,7 @@ public function testFromString() {
656 656
 	public function testConvertSpecifiers() {
657 657
 		App::build(array(
658 658
 			'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
659  
-		), true);
  659
+		), App::RESET);
660 660
 		Configure::write('Config.language', 'time_test');
661 661
 		$time = strtotime('Thu Jan 14 11:43:39 2010');
662 662
 
@@ -763,7 +763,7 @@ public function testConvertPercentE() {
763 763
 	public function testI18nFormat() {
764 764
 		App::build(array(
765 765
 			'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS)
766  
-		), true);
  766
+		), App::RESET);
767 767
 		Configure::write('Config.language', 'time_test');
768 768
 
769 769
 		$time = strtotime('Thu Jan 14 13:59:28 2010');
2  lib/Cake/Test/Case/View/Helper/CacheHelperTest.php
@@ -85,7 +85,7 @@ public function setUp() {
85 85
 		Configure::write('Cache.disable', false);
86 86
 		App::build(array(
87 87
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
88  
-		), true);
  88
+		), App::RESET);
89 89
 	}
90 90
 
91 91
 /**
4  lib/Cake/Test/Case/View/Helper/NumberHelperTest.php
@@ -92,13 +92,13 @@ public function testNumberHelperProxyMethodCalls() {
92 92
 	public function testEngineOverride() {
93 93
 		App::build(array(
94 94
 			'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
95  
-			), APP::REGISTER);
  95
+		), App::REGISTER);
96 96
 		$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
97 97
 		$this->assertInstanceOf('TestAppEngine', $Number->engine());
98 98
 
99 99
 		App::build(array(
100 100
 			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
101  
-			));
  101
+		));
102 102
 		CakePlugin::load('TestPlugin');
103 103
 		$Number = new NumberHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
104 104
 		$this->assertInstanceOf('TestPluginEngine', $Number->engine());
4  lib/Cake/Test/Case/View/Helper/TextHelperTest.php
@@ -88,13 +88,13 @@ public function testTextHelperProxyMethodCalls() {
88 88
 	public function testEngineOverride() {
89 89
 		App::build(array(
90 90
 			'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
91  
-			), APP::REGISTER);
  91
+		), App::REGISTER);
92 92
 		$Text = new TextHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
93 93
 		$this->assertInstanceOf('TestAppEngine', $Text->engine());
94 94
 
95 95
 		App::build(array(
96 96
 			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
97  
-			));
  97
+		));
98 98
 		CakePlugin::load('TestPlugin');
99 99
 		$Text = new TextHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
100 100
 		$this->assertInstanceOf('TestPluginEngine', $Text->engine());
4  lib/Cake/Test/Case/View/Helper/TimeHelperTest.php
@@ -98,13 +98,13 @@ public function testTimeHelperProxyMethodCalls() {
98 98
 	public function testEngineOverride() {
99 99
 		App::build(array(
100 100
 			'Utility' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Utility' . DS)
101  
-			), APP::REGISTER);
  101
+		), App::REGISTER);
102 102
 		$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestAppEngine'));
103 103
 		$this->assertInstanceOf('TestAppEngine', $Time->engine());
104 104
 
105 105
 		App::build(array(
106 106
 			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
107  
-			));
  107
+		));
108 108
 		CakePlugin::load('TestPlugin');
109 109
 		$Time = new TimeHelperTestObject($this->View, array('engine' => 'TestPlugin.TestPluginEngine'));
110 110
 		$this->assertInstanceOf('TestPluginEngine', $Time->engine());
2  lib/Cake/Test/Case/View/ViewTest.php
@@ -271,7 +271,7 @@ public function setUp() {
271 271
 		App::build(array(
272 272
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
273 273
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
274  
-		), true);
  274
+		), App::RESET);
275 275
 		App::objects('plugins', null, false);
276 276
 
277 277
 		CakePlugin::load(array('TestPlugin', 'TestPlugin', 'PluginJs'));

0 notes on commit c4829dc

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