Browse Source

Remove App::pluginPath() which was simply wrapper for Plugin::path().

ADmad 11 years ago
parent
commit
4bd4d725eb
2 changed files with 0 additions and 38 deletions
  1. 0 17
      src/Core/App.php
  2. 0 21
      tests/TestCase/Core/AppTest.php

+ 0 - 17
src/Core/App.php

@@ -147,23 +147,6 @@ class App {
 	}
 
 /**
- * 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
  *
  * Usage:

+ 0 - 21
tests/TestCase/Core/AppTest.php

@@ -252,25 +252,4 @@ class AppTest extends TestCase {
 		$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);
-	}
-
 }