Continued:
[core.git] / framework / main / tests / resolver / command / console / class_TestsConsoleCommandResolver.php
index b424f02e0038afba385dab424ff4f1e41b5d109f..7220e3e0165b058127c010162406326981958031 100644 (file)
@@ -1,12 +1,11 @@
 <?php
 // Own namespace
-namespace CoreFramework\Tests\Resolver\Command;
+namespace Org\Mxchange\CoreFramework\Tests\Resolver\Command;
 
 // Import framework stuff
-use CoreFramework\Command\InvalidCommandException;
-use CoreFramework\Manager\ManageableApplication;
-use CoreFramework\Resolver\Command\BaseCommandResolver;
-use CoreFramework\Resolver\Command\CommandResolver;
+use Org\Mxchange\CoreFramework\Command\InvalidCommandException;
+use Org\Mxchange\CoreFramework\Resolver\Command\BaseCommandResolver;
+use Org\Mxchange\CoreFramework\Resolver\Command\CommandResolver;
 
 // Import SPL stuff
 use \InvalidArgumentException;
@@ -51,12 +50,11 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command
         * Creates an instance of a TestsConsole command resolver with a given default 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      InvalidArgumentException                Thrown if default command is not set
         * @throws      InvalidCommandException         Thrown if default command is invalid
         */
-       public static final function createTestsConsoleCommandResolver ($commandName, ManageableApplication $applicationInstance) {
+       public static final function createTestsConsoleCommandResolver ($commandName) {
                // Create the new instance
                $resolverInstance = new TestsConsoleCommandResolver();
 
@@ -64,14 +62,14 @@ class TestsConsoleCommandResolver extends BaseCommandResolver implements Command
                if (empty($commandName)) {
                        // Then thrown an exception here
                        throw new InvalidArgumentException('Parameter "commandName" is empty');
-               } elseif ($resolverInstance->isCommandValid('CoreFramework\Tests\Command', $commandName) === false) {
+               } 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');
+               $resolverInstance->setCommandName($commandName);
 
                // Return the prepared instance
                return $resolverInstance;