X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=framework%2Fmain%2Ftests%2Fresolver%2Fcommand%2Fconsole%2Fclass_TestsConsoleCommandResolver.php;h=9d61d50ae534c141804af45d423417036cc94e42;hb=e137daa3a06f4b9e3767db913854c609383e8533;hp=5455f6a20e319ba0a3b599bda0ba8e1093ddd442;hpb=8d455a2d215b09cf56db7b7daf71acc44f373cb7;p=core.git diff --git a/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php b/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php index 5455f6a2..9d61d50a 100644 --- a/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php +++ b/framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php @@ -1,20 +1,22 @@ * @version 0.0.0 - * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 Core Developer Team + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team * @license GNU GPL 3.0 or any newer version * @link http://www.shipsimu.org * @@ -51,7 +53,7 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command * @param $commandName The default command we shall execute * @param $applicationInstance An instance of a manageable application helper class * @return $resolverInstance The prepared command resolver instance - * @throws EmptyVariableException Thrown if default command is not set + * @throws InvalidArgumentException Thrown if default command is not set * @throws InvalidCommandException Thrown if default command is invalid */ public static final function createTestsConsoleCommandResolver ($commandName, ManageableApplication $applicationInstance) { @@ -61,15 +63,14 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command // Is the variable $commandName set and the command is valid? if (empty($commandName)) { // Then thrown an exception here - throw new EmptyVariableException(array($resolverInstance, 'commandName'), self::EXCEPTION_UNEXPECTED_EMPTY_STRING); - } elseif ($resolverInstance->isCommandValid('CoreFramework\Tests\Command', $commandName) === false) { + throw new InvalidArgumentException('Parameter "commandName" is empty'); + } elseif ($resolverInstance->isCommandValid('Org\Mxchange\CoreFramework\Tests\Command', $commandName) === false) { // Invalid command found throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND); } - // Set namespace and application instance - $resolverInstance->setNamespace('CoreFramework\Tests\Command'); - $resolverInstance->setApplicationInstance($applicationInstance); + // Set namespace for command + $resolverInstance->setNamespace('Org\Mxchange\CoreFramework\Tests\Command'); // Return the prepared instance return $resolverInstance;