Skip to content

Commit

Permalink
Move MissingPluginException under Core/Error
Browse files Browse the repository at this point in the history
  • Loading branch information
ADmad committed Apr 13, 2014
1 parent 370a89d commit bdcf810
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/Core/Plugin.php
Expand Up @@ -15,7 +15,6 @@
namespace Cake\Core;

use Cake\Core\ClassLoader;
use Cake\Error;
use Cake\Utility\Inflector;

/**
Expand Down Expand Up @@ -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 = []) {
Expand Down Expand Up @@ -195,7 +194,7 @@ public static function loadAll(array $options = []) {
*
* @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])) {
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/Core/PluginTest.php
Expand Up @@ -207,7 +207,7 @@ public function testIgnoreMissingFiles() {
* 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');
Expand All @@ -231,7 +231,7 @@ public function testPath() {
* 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');
Expand Down

0 comments on commit bdcf810

Please sign in to comment.