diff --git a/lib/Cake/Core/App.php b/lib/Cake/Core/App.php index 9a9f17887..b3d0aee84 100644 --- a/lib/Cake/Core/App.php +++ b/lib/Cake/Core/App.php @@ -166,7 +166,9 @@ class App { 'views' => 'View', 'helpers' => 'View/Helper', 'shells' => 'Console/Command', - 'libs' => 'Lib' + 'libs' => 'Lib', + 'vendors' => 'Vendor', + 'plugins' => 'Plugin', ); /** @@ -320,8 +322,8 @@ class App { '%s' . 'Locale' . DS, '%s' . 'locale' . DS ), - 'vendors' => array('%s' . 'Vendor' . DS, VENDORS), - 'plugins' => array( + 'Vendor' => array('%s' . 'Vendor' . DS, VENDORS), + 'Plugin' => array( APP . 'Plugin' . DS, APP . 'plugins' . DS, dirname(dirname(CAKE)) . DS . 'plugins' . DS, diff --git a/lib/Cake/Test/Case/Core/AppTest.php b/lib/Cake/Test/Case/Core/AppTest.php index 59a90edb5..c6462581a 100644 --- a/lib/Cake/Test/Case/Core/AppTest.php +++ b/lib/Cake/Test/Case/Core/AppTest.php @@ -183,6 +183,22 @@ class AppTest extends CakeTestCase { $this->assertEqual($old, $defaults); } +/** + * test path() with a plugin. + * + * @return void + */ + public function testPathWithPlugins() { + $basepath = CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS; + App::build(array( + 'Plugin' => array($basepath), + )); + CakePlugin::load('TestPlugin'); + + $result = App::path('Vendor', 'TestPlugin'); + $this->assertEquals($basepath . 'TestPlugin' . DS . 'Vendor' . DS, $result[0]); + } + /** * testBuildWithReset method * @@ -757,7 +773,7 @@ class AppTest extends CakeTestCase { */ public function testPaths() { $result = App::paths(); - $this->assertArrayHasKey('plugins', $result); + $this->assertArrayHasKey('Plugin', $result); $this->assertArrayHasKey('Controller', $result); $this->assertArrayHasKey('Controller/Component', $result); }