Adding tests for App::pluginPath that were omitted before.

This commit is contained in:
mark_story 2009-11-15 16:38:02 -05:00
parent 0049c9ad81
commit 31102ad412

View file

@ -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
*