Skip to content

Commit

Permalink
Remove App::pluginPath() which was simply wrapper for Plugin::path().
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Jun 11, 2014
1 parent 808f4ac commit 4bd4d72
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 38 deletions.
17 changes: 0 additions & 17 deletions src/Core/App.php
Expand Up @@ -146,23 +146,6 @@ public static function path($type, $plugin = null) {
return [APP . $type . DS];
}

/**
* Gets the path that a plugin is on. Searches through the defined plugin paths.
*
* Usage:
*
* `App::pluginPath('MyPlugin');`
*
* Will return the full path to 'MyPlugin' plugin
*
* @param string $plugin Name of the plugin in CamelCase format.
* @return string full path to the plugin.
* @link http://book.cakephp.org/2.0/en/core-utility-libraries/app.html#App::pluginPath
*/
public static function pluginPath($plugin) {
return Plugin::path($plugin);
}

/**
* Returns the full path to a package inside the CakePHP core
*
Expand Down
21 changes: 0 additions & 21 deletions tests/TestCase/Core/AppTest.php
Expand Up @@ -252,25 +252,4 @@ public function testListObjectsInPlugin() {
$this->assertContains('ArticlesTable', $result);
}

/**
* test that pluginPath can find paths for plugins.
*
* @return void
*/
public function testPluginPath() {
Plugin::load(['TestPlugin', 'TestPluginTwo', 'Company/TestPluginThree']);

$path = App::pluginPath('TestPlugin');
$expected = TEST_APP . 'Plugin' . DS . 'TestPlugin' . DS;
$this->assertPathEquals($expected, $path);

$path = App::pluginPath('TestPluginTwo');
$expected = TEST_APP . 'Plugin' . DS . 'TestPluginTwo' . DS;
$this->assertPathEquals($expected, $path);

$path = App::pluginPath('Company/TestPluginThree');
$expected = TEST_APP . 'Plugin' . DS . 'Company' . DS . 'TestPluginThree' . DS;
$this->assertPathEquals($expected, $path);
}

}

0 comments on commit 4bd4d72

Please sign in to comment.