Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Load specific test plugins rather than all to avoid conflicts

  • Loading branch information...
commit 4141a3ab5b1cfdfa3b1bb0e988917549130e3d90 1 parent a9c279a
Kyle Robinson Young shama authored
2  lib/Cake/Test/Case/Console/Command/CommandListShellTest.php
View
@@ -47,7 +47,7 @@ public function setUp() {
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
)
), true);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$out = new TestStringOutput();
$in = $this->getMock('ConsoleInput', array(), array(), '', false);
2  lib/Cake/Test/Case/Console/ShellDispatcherTest.php
View
@@ -120,7 +120,7 @@ public function setUp() {
CAKE . 'Test' . DS . 'test_app' . DS . 'Console' . DS . 'Command' . DS
)
), true);
- CakePlugin::loadAll();
+ CakePlugin::load('TestPlugin');
}
/**
12 lib/Cake/Test/Case/Core/AppTest.php
View
@@ -370,7 +370,7 @@ public function testListObjectsInPlugin() {
'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), App::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$result = App::objects('TestPlugin.model');
$this->assertTrue(in_array('TestPluginPost', $result));
@@ -419,7 +419,7 @@ public function testPluginPath() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$path = App::pluginPath('TestPlugin');
$expected = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS . 'TestPlugin' . DS;
@@ -540,7 +540,7 @@ public function testPluginImporting() {
'Lib' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$result = App::import('Controller', 'TestPlugin.Tests');
$this->assertTrue($result);
@@ -715,7 +715,7 @@ public function testLoadingVendor() {
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
), App::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
ob_start();
$result = App::import('Vendor', 'css/TestAsset', array('ext' => 'css'));
@@ -772,7 +772,7 @@ public function testLoadClassInLibs() {
'libs' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Lib' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), App::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$this->assertFalse(class_exists('CustomLibClass', false));
App::uses('CustomLibClass', 'TestPlugin.Custom/Package');
@@ -815,7 +815,7 @@ public function testPluginLibClasses() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), App::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$this->assertFalse(class_exists('TestPluginOtherLibrary', false));
App::uses('TestPluginOtherLibrary', 'TestPlugin.Lib');
$this->assertTrue(class_exists('TestPluginOtherLibrary'));
2  lib/Cake/Test/Case/Core/ObjectTest.php
View
@@ -530,7 +530,7 @@ public function testRequestActionArray() {
'controllers' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Controller' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin'. DS)
), true);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
$result = $this->object->requestAction(
array('controller' => 'request_action', 'action' => 'test_request_action')
2  lib/Cake/Test/Case/I18n/I18nTest.php
View
@@ -36,7 +36,7 @@ public function setUp() {
'locales' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Locale' . DS),
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
}
/**
2  lib/Cake/Test/Case/Model/ConnectionManagerTest.php
View
@@ -275,7 +275,7 @@ public function testConnectionData() {
CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS
)
), App::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$expected = array(
'datasource' => 'Test2Source'
);
8 lib/Cake/Test/Case/Routing/DispatcherTest.php
View
@@ -1039,7 +1039,7 @@ public function testPluginShortCutUrlsWithControllerThatNeedsToBeLoaded() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), true);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$Dispatcher = new TestDispatcher();
$Dispatcher->base = false;
@@ -1115,7 +1115,7 @@ public function testTestPluginDispatch() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), APP::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
Router::reload();
Router::parse('/');
@@ -1176,7 +1176,7 @@ public function testAssets() {
'vendors' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$Dispatcher = new TestDispatcher();
$response = $this->getMock('CakeResponse', array('_sendHeader'));
@@ -1294,7 +1294,7 @@ public function testAsset($url, $file) {
'Vendor' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Vendor'. DS),
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'PluginJs'));
$Dispatcher = new TestDispatcher();
$response = $this->getMock('CakeResponse', array('_sendHeader'));
4 lib/Cake/Test/Case/Routing/RouterTest.php
View
@@ -1188,7 +1188,7 @@ public function testPrefixRoutingAndPlugins() {
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
), true);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
Router::reload();
require CAKE . 'Config' . DS . 'routes.php';
@@ -2202,7 +2202,7 @@ public function testConnectDefaultRoutes() {
CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS
)
), true);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'PluginJs'));
Router::reload();
require CAKE . 'Config' . DS . 'routes.php';
2  lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
View
@@ -125,7 +125,7 @@ public function setUp() {
'Model' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS),
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
), App::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin', 'TestPluginTwo'));
$this->Case = $this->getMockForAbstractClass('ControllerTestCase');
Router::reload();
}
2  lib/Cake/Test/Case/TestSuite/HtmlCoverageReportTest.php
View
@@ -31,7 +31,7 @@ public function setUp() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)
), App::RESET);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
$reporter = new CakeBaseReporter();
$reporter->params = array('app' => false, 'plugin' => false, 'group' => false);
$coverage = array();
4 lib/Cake/Test/Case/View/HelperCollectionTest.php
View
@@ -85,7 +85,7 @@ public function testLoadWithAlias() {
$this->assertInstanceOf('HtmlAliasHelper', $result);
App::build(array('plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS)));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
$result = $this->Helpers->load('SomeOther', array('className' => 'TestPlugin.OtherHelper'));
$this->assertInstanceOf('OtherHelperHelper', $result);
$this->assertInstanceOf('OtherHelperHelper', $this->Helpers->SomeOther);
@@ -127,7 +127,7 @@ public function testLoadPluginHelper() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
$result = $this->Helpers->load('TestPlugin.OtherHelper');
$this->assertInstanceOf('OtherHelperHelper', $result, 'Helper class is wrong.');
$this->assertInstanceOf('OtherHelperHelper', $this->Helpers->OtherHelper, 'Class is wrong');
4 lib/Cake/Test/Case/View/HelperTest.php
View
@@ -649,7 +649,7 @@ public function testAssetTimestampPluginsAndThemes() {
App::build(array(
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS),
));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));;
$result = $this->Helper->assetTimestamp('/test_plugin/css/test_plugin_asset.css');
$this->assertRegExp('#/test_plugin/css/test_plugin_asset.css\?[0-9]+$#', $result, 'Missing timestamp plugin');
@@ -888,7 +888,7 @@ public function testLazyLoadingHelpers() {
App::build(array(
'plugins' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS),
));
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
$Helper = new TestHelper($this->View);
$this->assertInstanceOf('OtherHelperHelper', $Helper->OtherHelper);
$this->assertInstanceOf('HtmlHelper', $Helper->Html);
2  lib/Cake/Test/Case/View/ThemeViewTest.php
View
@@ -115,7 +115,7 @@ public function setUp() {
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View'. DS)
));
App::objects('plugins', null, false);
- CakePlugin::loadAll();
+ CakePlugin::load(array('TestPlugin'));
}
/**
3  lib/Cake/Test/Case/View/ViewTest.php
View
@@ -276,9 +276,6 @@ public function setUp() {
CakePlugin::load(array('TestPlugin', 'TestPlugin', 'PluginJs'));
Configure::write('debug', 2);
-
- CakePlugin::loadAll();
-
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.