|
|
@@ -55,8 +55,8 @@ class PluginTest extends TestCase {
|
|
|
|
|
|
$this->assertEquals('TestPluginTwo', Plugin::getNamespace('TestPluginTwo'));
|
|
|
|
|
|
- Plugin::load('Company/TestPluginThree');
|
|
|
- $this->assertEquals('Company\TestPluginThree', Plugin::getNamespace('Company/TestPluginThree'));
|
|
|
+ Plugin::load('Company\TestPluginThree');
|
|
|
+ $this->assertEquals('Company\TestPluginThree', Plugin::getNamespace('Company\TestPluginThree'));
|
|
|
|
|
|
Plugin::load('CustomPlugin', array('namespace' => 'Company\TestPluginThree'));
|
|
|
$this->assertEquals('Company\TestPluginThree', Plugin::getNamespace('CustomPlugin'));
|
|
|
@@ -102,7 +102,7 @@ class PluginTest extends TestCase {
|
|
|
*/
|
|
|
public function testLoadSingleWithAutoload() {
|
|
|
$this->assertFalse(class_exists('Company\TestPluginThree\Utility\Hello'));
|
|
|
- Plugin::load('Company/TestPluginThree', [
|
|
|
+ Plugin::load('Company\TestPluginThree', [
|
|
|
'autoload' => true,
|
|
|
]);
|
|
|
$this->assertTrue(
|
|
|
@@ -121,8 +121,8 @@ class PluginTest extends TestCase {
|
|
|
$this->assertTrue(Plugin::loaded('TestPlugin'));
|
|
|
$this->assertEquals('loaded plugin bootstrap', Configure::read('PluginTest.test_plugin.bootstrap'));
|
|
|
|
|
|
- Plugin::load('Company/TestPluginThree', array('bootstrap' => true));
|
|
|
- $this->assertTrue(Plugin::loaded('Company/TestPluginThree'));
|
|
|
+ Plugin::load('Company\TestPluginThree', array('bootstrap' => true));
|
|
|
+ $this->assertTrue(Plugin::loaded('Company\TestPluginThree'));
|
|
|
$this->assertEquals('loaded plugin three bootstrap', Configure::read('PluginTest.test_plugin_three.bootstrap'));
|
|
|
|
|
|
Configure::delete('PluginTest.test_plugin_three.bootstrap');
|
|
|
@@ -226,7 +226,7 @@ class PluginTest extends TestCase {
|
|
|
* @return void
|
|
|
*/
|
|
|
public function testPath() {
|
|
|
- Plugin::load(array('TestPlugin', 'TestPluginTwo', 'Company/TestPluginThree'));
|
|
|
+ Plugin::load(array('TestPlugin', 'TestPluginTwo', 'Company\TestPluginThree'));
|
|
|
$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS;
|
|
|
$this->assertPathEquals(Plugin::path('TestPlugin'), $expected);
|
|
|
|
|
|
@@ -234,7 +234,7 @@ class PluginTest extends TestCase {
|
|
|
$this->assertPathEquals(Plugin::path('TestPluginTwo'), $expected);
|
|
|
|
|
|
$expected = TEST_APP . 'Plugin' . DS . 'Company' . DS . 'TestPluginThree' . DS;
|
|
|
- $this->assertPathEquals(Plugin::path('Company/TestPluginThree'), $expected);
|
|
|
+ $this->assertPathEquals(Plugin::path('Company\TestPluginThree'), $expected);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -253,7 +253,7 @@ class PluginTest extends TestCase {
|
|
|
* @return void
|
|
|
*/
|
|
|
public function testClassPath() {
|
|
|
- Plugin::load(array('TestPlugin', 'TestPluginTwo', 'Company/TestPluginThree'));
|
|
|
+ Plugin::load(array('TestPlugin', 'TestPluginTwo', 'Company\TestPluginThree'));
|
|
|
$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS . 'src' . DS;
|
|
|
$this->assertPathEquals(Plugin::classPath('TestPlugin'), $expected);
|
|
|
|
|
|
@@ -261,7 +261,7 @@ class PluginTest extends TestCase {
|
|
|
$this->assertPathEquals(Plugin::classPath('TestPluginTwo'), $expected);
|
|
|
|
|
|
$expected = TEST_APP . 'Plugin' . DS . 'Company' . DS . 'TestPluginThree' . DS . 'src' . DS;
|
|
|
- $this->assertPathEquals(Plugin::classPath('Company/TestPluginThree'), $expected);
|
|
|
+ $this->assertPathEquals(Plugin::classPath('Company\TestPluginThree'), $expected);
|
|
|
}
|
|
|
|
|
|
/**
|