]> git.mxchange.org Git - core.git/blobdiff - framework/main/tests/resolver/command/console/class_TestsConsoleCommandResolver.php
Rewrite continues:
[core.git] / framework / main / tests / resolver / command / console / class_TestsConsoleCommandResolver.php
index dab091ea5f1094cfc07d3764418db16e8e2e7a9f..b424f02e0038afba385dab424ff4f1e41b5d109f 100644 (file)
@@ -4,11 +4,13 @@ namespace CoreFramework\Tests\Resolver\Command;
 
 // Import framework stuff
 use CoreFramework\Command\InvalidCommandException;
-use CoreFramework\Generic\EmptyVariableException;
 use CoreFramework\Manager\ManageableApplication;
 use CoreFramework\Resolver\Command\BaseCommandResolver;
 use CoreFramework\Resolver\Command\CommandResolver;
 
+// Import SPL stuff
+use \InvalidArgumentException;
+
 /**
  * A command resolver for console commands
  *
@@ -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,7 +63,7 @@ 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);
+                       throw new InvalidArgumentException('Parameter "commandName" is empty');
                } elseif ($resolverInstance->isCommandValid('CoreFramework\Tests\Command', $commandName) === false) {
                        // Invalid command found
                        throw new InvalidCommandException(array($resolverInstance, $commandName), self::EXCEPTION_INVALID_COMMAND);