Browse Source

Move MissingPluginException under Core/Error

ADmad 12 years ago
parent
commit
bdcf810b01
3 changed files with 7 additions and 6 deletions
  1. 3 1
      src/Error/MissingPluginException.php
  2. 2 3
      src/Core/Plugin.php
  3. 2 2
      tests/TestCase/Core/PluginTest.php

+ 3 - 1
src/Error/MissingPluginException.php

@@ -15,7 +15,9 @@
  * @since         3.0.0
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
  */
-namespace Cake\Error;
+namespace Cake\Core\Error;
+
+use Cake\Error\Exception;
 
 /**
  * Exception raised when a plugin could not be found

+ 2 - 3
src/Core/Plugin.php

@@ -15,7 +15,6 @@
 namespace Cake\Core;
 
 use Cake\Core\ClassLoader;
-use Cake\Error;
 use Cake\Utility\Inflector;
 
 /**
@@ -108,7 +107,7 @@ class Plugin {
  *
  * @param string|array $plugin name of the plugin to be loaded in CamelCase format or array or plugins to load
  * @param array $config configuration options for the plugin
- * @throws \Cake\Error\MissingPluginException if the folder for the plugin to be loaded is not found
+ * @throws \Cake\Core\Error\MissingPluginException if the folder for the plugin to be loaded is not found
  * @return void
  */
 	public static function load($plugin, array $config = []) {
@@ -195,7 +194,7 @@ class Plugin {
  *
  * @param string $plugin name of the plugin in CamelCase format
  * @return string path to the plugin folder
- * @throws \Cake\Error\MissingPluginException if the folder for plugin was not found or plugin has not been loaded
+ * @throws \Cake\Core\Error\MissingPluginException if the folder for plugin was not found or plugin has not been loaded
  */
 	public static function path($plugin) {
 		if (empty(static::$_plugins[$plugin])) {

+ 2 - 2
tests/TestCase/Core/PluginTest.php

@@ -207,7 +207,7 @@ class PluginTest extends TestCase {
  * Tests that Plugin::load() throws an exception on unknown plugin
  *
  * @return void
- * @expectedException \Cake\Error\MissingPluginException
+ * @expectedException \Cake\Core\Error\MissingPluginException
  */
 	public function testLoadNotFound() {
 		Plugin::load('MissingPlugin');
@@ -231,7 +231,7 @@ class PluginTest extends TestCase {
  * Tests that Plugin::path() throws an exception on unknown plugin
  *
  * @return void
- * @expectedException \Cake\Error\MissingPluginException
+ * @expectedException \Cake\Core\Error\MissingPluginException
  */
 	public function testPathNotFound() {
 		Plugin::path('TestPlugin');