Skip to content
This repository
Browse code

Load specific test plugins rather than all to avoid conflicts

  • Loading branch information...
commit 4141a3ab5b1cfdfa3b1bb0e988917549130e3d90 1 parent a9c279a
Kyle Robinson Young authored February 16, 2012
2  lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
@@ -47,7 +47,7 @@ public function setUp() {
47 47
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
48 48
 			)
49 49
 		), true);
50  
-		CakePlugin::loadAll();
  50
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
51 51
 
52 52
 		$out = new TestStringOutput();
53 53
 		$in = $this->getMock('ConsoleInput', array(), array(), '', false);
2  lib/Cake/Test/Case/Console/ShellDispatcherTest.php
@@ -120,7 +120,7 @@ public function setUp() {
120 120
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
121 121
 			)
122 122
 		), true);
123  
-		CakePlugin::loadAll();
  123
+		CakePlugin::load('TestPlugin');
124 124
 	}
125 125
 
126 126
 /**
12  lib/Cake/Test/Case/Core/AppTest.php
@@ -370,7 +370,7 @@ public function testListObjectsInPlugin() {
370 370
 			'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
371 371
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
372 372
 		), App::RESET);
373  
-		CakePlugin::loadAll();
  373
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
374 374
 
375 375
 		$result = App::objects('TestPlugin.model');
376 376
 		$this->assertTrue(in_array('TestPluginPost', $result));
@@ -419,7 +419,7 @@ public function testPluginPath() {
419 419
 		App::build(array(
420 420
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
421 421
 		));
422  
-		CakePlugin::loadAll();
  422
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
423 423
 
424 424
 		$path = App::pluginPath('TestPlugin');
425 425
 		$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
@@ -540,7 +540,7 @@ public function testPluginImporting() {
540 540
 			'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
541 541
 			'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
542 542
 		));
543  
-		CakePlugin::loadAll();
  543
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
544 544
 
545 545
 		$result = App::import('Controller', 'TestPlugin.Tests');
546 546
 		$this->assertTrue($result);
@@ -715,7 +715,7 @@ public function testLoadingVendor() {
715 715
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
716 716
 			'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
717 717
 		), App::RESET);
718  
-		CakePlugin::loadAll();
  718
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
719 719
 
720 720
 		ob_start();
721 721
 		$result = App::import('Vendor', 'css/TestAsset', array('ext' => 'css'));
@@ -772,7 +772,7 @@ public function testLoadClassInLibs() {
772 772
 			'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
773 773
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
774 774
 		), App::RESET);
775  
-		CakePlugin::loadAll();
  775
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
776 776
 
777 777
 		$this->assertFalse(class_exists('CustomLibClass', false));
778 778
 		App::uses('CustomLibClass', 'TestPlugin.Custom/Package');
@@ -815,7 +815,7 @@ public function testPluginLibClasses() {
815 815
 		App::build(array(
816 816
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
817 817
 		), App::RESET);
818  
-		CakePlugin::loadAll();
  818
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
819 819
 		$this->assertFalse(class_exists('TestPluginOtherLibrary', false));
820 820
 		App::uses('TestPluginOtherLibrary', 'TestPlugin.Lib');
821 821
 		$this->assertTrue(class_exists('TestPluginOtherLibrary'));
2  lib/Cake/Test/Case/Core/ObjectTest.php
@@ -530,7 +530,7 @@ public function testRequestActionArray() {
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 532
 		), true);
533  
-		CakePlugin::loadAll();
  533
+		CakePlugin::load(array('TestPlugin'));
534 534
 
535 535
 		$result = $this->object->requestAction(
536 536
 			array('controller' => 'request_action', 'action' => 'test_request_action')
2  lib/Cake/Test/Case/I18n/I18nTest.php
@@ -36,7 +36,7 @@ public function setUp() {
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 38
 		), true);
39  
-		CakePlugin::loadAll();
  39
+		CakePlugin::load(array('TestPlugin'));
40 40
 	}
41 41
 
42 42
 /**
2  lib/Cake/Test/Case/Model/ConnectionManagerTest.php
@@ -275,7 +275,7 @@ public function testConnectionData() {
275 275
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS
276 276
 			)
277 277
 		), App::RESET);
278  
-		CakePlugin::loadAll();
  278
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
279 279
 		$expected = array(
280 280
 			'datasource' => 'Test2Source'
281 281
 		);
8  lib/Cake/Test/Case/Routing/DispatcherTest.php
@@ -1039,7 +1039,7 @@ public function testPluginShortCutUrlsWithControllerThatNeedsToBeLoaded() {
1039 1039
 		App::build(array(
1040 1040
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
1041 1041
 		), true);
1042  
-		CakePlugin::loadAll();
  1042
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
1043 1043
 
1044 1044
 		$Dispatcher = new TestDispatcher();
1045 1045
 		$Dispatcher->base = false;
@@ -1115,7 +1115,7 @@ public function testTestPluginDispatch() {
1115 1115
 		App::build(array(
1116 1116
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
1117 1117
 		), APP::RESET);
1118  
-		CakePlugin::loadAll();
  1118
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
1119 1119
 		Router::reload();
1120 1120
 		Router::parse('/');
1121 1121
 
@@ -1176,7 +1176,7 @@ public function testAssets() {
1176 1176
 			'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
1177 1177
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
1178 1178
 		));
1179  
-		CakePlugin::loadAll();
  1179
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
1180 1180
 
1181 1181
 		$Dispatcher = new TestDispatcher();
1182 1182
 		$response = $this->getMock('CakeResponse', array('_sendHeader'));
@@ -1294,7 +1294,7 @@ public function testAsset($url, $file) {
1294 1294
 			'Vendor' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
1295 1295
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
1296 1296
 		));
1297  
-		CakePlugin::loadAll();
  1297
+		CakePlugin::load(array('TestPlugin', 'PluginJs'));
1298 1298
 
1299 1299
 		$Dispatcher = new TestDispatcher();
1300 1300
 		$response = $this->getMock('CakeResponse', array('_sendHeader'));
4  lib/Cake/Test/Case/Routing/RouterTest.php
@@ -1188,7 +1188,7 @@ public function testPrefixRoutingAndPlugins() {
1188 1188
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
1189 1189
 			)
1190 1190
 		), true);
1191  
-		CakePlugin::loadAll();
  1191
+		CakePlugin::load(array('TestPlugin'));
1192 1192
 
1193 1193
 		Router::reload();
1194 1194
 		require CAKE . 'Config' . DS . 'routes.php';
@@ -2202,7 +2202,7 @@ public function testConnectDefaultRoutes() {
2202 2202
 				CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
2203 2203
 			)
2204 2204
 		), true);
2205  
-		CakePlugin::loadAll();
  2205
+		CakePlugin::load(array('TestPlugin', 'PluginJs'));
2206 2206
 		Router::reload();
2207 2207
 		require CAKE . 'Config' . DS . 'routes.php';
2208 2208
 
2  lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
@@ -125,7 +125,7 @@ public function setUp() {
125 125
 			'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
126 126
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
127 127
 		), App::RESET);
128  
-		CakePlugin::loadAll();
  128
+		CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
129 129
 		$this->Case = $this->getMockForAbstractClass('ControllerTestCase');
130 130
 		Router::reload();
131 131
 	}
2  lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php
@@ -31,7 +31,7 @@ public function setUp() {
31 31
 		App::build(array(
32 32
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
33 33
 		), App::RESET);
34  
-		CakePlugin::loadAll();
  34
+		CakePlugin::load(array('TestPlugin'));
35 35
 		$reporter = new CakeBaseReporter();
36 36
 		$reporter->params = array('app' => false, 'plugin' => false, 'group' => false);
37 37
 		$coverage = array();
4  lib/Cake/Test/Case/View/HelperCollectionTest.php
@@ -85,7 +85,7 @@ public function testLoadWithAlias() {
85 85
 		$this->assertInstanceOf('HtmlAliasHelper', $result);
86 86
 
87 87
 		App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
88  
-		CakePlugin::loadAll();
  88
+		CakePlugin::load(array('TestPlugin'));
89 89
 		$result = $this->Helpers->load('SomeOther', array('className' => 'TestPlugin.OtherHelper'));
90 90
 		$this->assertInstanceOf('OtherHelperHelper', $result);
91 91
 		$this->assertInstanceOf('OtherHelperHelper', $this->Helpers->SomeOther);
@@ -127,7 +127,7 @@ public function testLoadPluginHelper() {
127 127
 		App::build(array(
128 128
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
129 129
 		));
130  
-		CakePlugin::loadAll();
  130
+		CakePlugin::load(array('TestPlugin'));
131 131
 		$result = $this->Helpers->load('TestPlugin.OtherHelper');
132 132
 		$this->assertInstanceOf('OtherHelperHelper', $result, 'Helper class is wrong.');
133 133
 		$this->assertInstanceOf('OtherHelperHelper', $this->Helpers->OtherHelper, 'Class is wrong');
4  lib/Cake/Test/Case/View/HelperTest.php
@@ -649,7 +649,7 @@ public function testAssetTimestampPluginsAndThemes() {
649 649
 		App::build(array(
650 650
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
651 651
 		));
652  
-		CakePlugin::loadAll();
  652
+		CakePlugin::load(array('TestPlugin'));;
653 653
 
654 654
 		$result = $this->Helper->assetTimestamp('/test_plugin/css/test_plugin_asset.css');
655 655
 		$this->assertRegExp('#/test_plugin/css/test_plugin_asset.css\?[0-9]+$#', $result, 'Missing timestamp plugin');
@@ -888,7 +888,7 @@ public function testLazyLoadingHelpers() {
888 888
 		App::build(array(
889 889
 			'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
890 890
 		));
891  
-		CakePlugin::loadAll();
  891
+		CakePlugin::load(array('TestPlugin'));
892 892
 		$Helper = new TestHelper($this->View);
893 893
 		$this->assertInstanceOf('OtherHelperHelper', $Helper->OtherHelper);
894 894
 		$this->assertInstanceOf('HtmlHelper', $Helper->Html);
2  lib/Cake/Test/Case/View/ThemeViewTest.php
@@ -115,7 +115,7 @@ public function setUp() {
115 115
 			'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
116 116
 		));
117 117
 		App::objects('plugins', null, false);
118  
-		CakePlugin::loadAll();
  118
+		CakePlugin::load(array('TestPlugin'));
119 119
 	}
120 120
 
121 121
 /**
3  lib/Cake/Test/Case/View/ViewTest.php
@@ -276,9 +276,6 @@ public function setUp() {
276 276
 
277 277
 		CakePlugin::load(array('TestPlugin', 'TestPlugin', 'PluginJs'));
278 278
 		Configure::write('debug', 2);
279  
-
280  
-		CakePlugin::loadAll();
281  
-
282 279
 	}
283 280
 
284 281
 /**

0 notes on commit 4141a3a

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