]> git.mxchange.org Git - core.git/blobdiff - application/tests/classes/commands/console/class_TestsConsoleMainCommand.php
Continued with tests and renaming:
[core.git] / application / tests / classes / commands / console / class_TestsConsoleMainCommand.php
index 66c8147b569d3b3c680f25963efc2bdaee33674c..d6a5f3898fdb402d4b78f37c0fb1a0bf2f0b26c3 100644 (file)
@@ -7,6 +7,7 @@ use CoreFramework\Command\BaseCommand;
 use CoreFramework\Command\Commandable;
 use CoreFramework\Controller\Controller;
 use CoreFramework\Factory\ObjectFactory;
+use CoreFramework\Registry\Registry;
 use CoreFramework\Request\Requestable;
 use CoreFramework\Resolver\Command\CommandResolver;
 use CoreFramework\Response\Responseable;
@@ -67,9 +68,11 @@ class TestsConsoleMainCommand extends BaseCommand implements Commandable {
         * @param       $requestInstance        An instance of a class with an Requestable interface
         * @param       $responseInstance       An instance of a class with an Responseable interface
         * @return      void
-        * @todo        Try to create a TestsActivationTask or so
         */
        public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+               // Debug message
+               self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Starting tests ... ---');
+
                // Get a registry and the application instance from it
                $applicationInstance = Registry::getRegistry()->getInstance('app');
 
@@ -85,11 +88,11 @@ class TestsConsoleMainCommand extends BaseCommand implements Commandable {
         * @return      void
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
-               // @TODO Unfinished
-               return;
+               // Add pre filters (e.g. for requirements checks)
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('tests_php_requirements_filter_class'));
 
-               // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter'));
+               // Add 'tests' filters which will run the actual tests
+               $controllerInstance->addTestsFilter(ObjectFactory::createObjectByConfiguredName('tests_configuration_classes_loadable_test_filter_class'));
        }
 
 }