|
|
@@ -253,8 +253,8 @@ class CakePluginTest extends CakeTestCase {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * Tests that CakePlugin::loadAll() will load all plugins in the configured folder wit defaults
|
|
|
- * and overrides for a plugin
|
|
|
+ * Tests that CakePlugin::loadAll() will load all plugins in the configured folder with defaults
|
|
|
+ * and merges in global defaults.
|
|
|
*
|
|
|
* @return void
|
|
|
*/
|
|
|
@@ -266,6 +266,24 @@ class CakePluginTest extends CakeTestCase {
|
|
|
$this->assertEquals($expected, CakePlugin::loaded());
|
|
|
$this->assertEquals('loaded js plugin bootstrap', Configure::read('CakePluginTest.js_plugin.bootstrap'));
|
|
|
$this->assertEquals('loaded plugin routes', Configure::read('CakePluginTest.test_plugin.routes'));
|
|
|
+ $this->assertEquals('loaded plugin bootstrap', Configure::read('CakePluginTest.test_plugin.bootstrap'));
|
|
|
+ $this->assertEquals('loaded plugin two bootstrap', Configure::read('CakePluginTest.test_plugin_two.bootstrap'));
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
+ * Tests that CakePlugin::loadAll() will load all plugins in the configured folder with defaults
|
|
|
+ * and overrides for a plugin
|
|
|
+ *
|
|
|
+ * @return void
|
|
|
+ */
|
|
|
+ public function testLoadAllWithDefaultsAndOverrideComplex() {
|
|
|
+ CakePlugin::loadAll(array(array('bootstrap' => true), 'TestPlugin' => array('routes' => true, 'bootstrap' => false)));
|
|
|
+ CakePlugin::routes();
|
|
|
+
|
|
|
+ $expected = array('PluginJs', 'TestPlugin', 'TestPluginTwo');
|
|
|
+ $this->assertEquals($expected, CakePlugin::loaded());
|
|
|
+ $this->assertEquals('loaded js plugin bootstrap', Configure::read('CakePluginTest.js_plugin.bootstrap'));
|
|
|
+ $this->assertEquals('loaded plugin routes', Configure::read('CakePluginTest.test_plugin.routes'));
|
|
|
$this->assertEquals(null, Configure::read('CakePluginTest.test_plugin.bootstrap'));
|
|
|
$this->assertEquals('loaded plugin two bootstrap', Configure::read('CakePluginTest.test_plugin_two.bootstrap'));
|
|
|
}
|