mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding tests for App::pluginPath that were omitted before.
This commit is contained in:
parent
0049c9ad81
commit
31102ad412
1 changed files with 23 additions and 0 deletions
|
@ -391,6 +391,29 @@ class AppImportTest extends UnitTestCase {
|
|||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* test that pluginPath can find paths for plugins.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function testPluginPath() {
|
||||
App::build(array(
|
||||
'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
|
||||
));
|
||||
$path = App::pluginPath('test_plugin');
|
||||
$expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS;
|
||||
$this->assertEqual($path, $expected);
|
||||
|
||||
$path = App::pluginPath('TestPlugin');
|
||||
$expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS;
|
||||
$this->assertEqual($path, $expected);
|
||||
|
||||
$path = App::pluginPath('TestPluginTwo');
|
||||
$expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin_two' . DS;
|
||||
$this->assertEqual($path, $expected);
|
||||
App::build();
|
||||
}
|
||||
|
||||
/**
|
||||
* testClassLoading method
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue