// Debug message
self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Starting tests ... ---');
- // Get a registry and the application instance from it
- $applicationInstance = Registry::getRegistry()->getInstance('app');
+ // Get controller
+ $controllerInstance = Registry::getRegistry()->getInstance('controller');
+
+ // Run all tests
+ $controllerInstance->executeTestsFilters($requestInstance, $responseInstance);
// Debug message
self::createDebugInstance(__CLASS__)->debugOutput('MAIN: --- Leaving main ... ---');
// Execute the command
$commandInstance->execute($requestInstance, $responseInstance);
- // Run the pre filters
+ // Run the post filters
$this->executePostFilters($requestInstance, $responseInstance);
// Flush the response out
use CoreFramework\Filter\Filterable;
use CoreFramework\Request\Requestable;
use CoreFramework\Response\Responseable;
+use CoreFramework\Tests\Filter\BaseTestsFilter;
/**
* A ??? filter for tests
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Own namespace
+namespace CoreFramework\Tests\Filter\Configuration\!!!;
+
+// Import framework stuff
+use CoreFramework\Filter\Filterable;
+use CoreFramework\Request\Requestable;
+use CoreFramework\Response\Responseable;
+use CoreFramework\Tests\Filter\BaseTestsFilter;
+
+/**
+ * A ??? filter for tests
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class TestConfiguration???Filter extends BaseTestsFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createTestConfiguration???Filter () {
+ // Get a new instance
+ $filterInstance = new TestConfiguration???Filter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @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 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Implement this!
+ $this->partialStub('Please implement this method.');
+ }
+
+}
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+// Own namespace
+namespace CoreFramework\Tests\Filter\Configuration\Classes;
+
+// Import framework stuff
+use CoreFramework\Filter\Filterable;
+use CoreFramework\Request\Requestable;
+use CoreFramework\Response\Responseable;
+use CoreFramework\Tests\Filter\BaseTestsFilter;
+
+/**
+ * A LoadableClasses filter for tests
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+class TestConfigurationLoadableClassesFilter extends BaseTestsFilter implements Filterable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this filter class
+ *
+ * @return $filterInstance An instance of this filter class
+ */
+ public final static function createTestConfigurationLoadableClassesFilter () {
+ // Get a new instance
+ $filterInstance = new TestConfigurationLoadableClassesFilter();
+
+ // Return the instance
+ return $filterInstance;
+ }
+
+ /**
+ * Executes the filter with given request and response objects
+ *
+ * @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 0% done
+ */
+ public function execute (Requestable $requestInstance, Responseable $responseInstance) {
+ // Implement this!
+ $this->partialStub('Please implement this method.');
+ }
+
+}
// CFG: TESTS-CONSOLE-CMD-MAIN-RESOLVER-CLASS
$cfg->setConfigEntry('tests_console_cmd_main_resolver_class', 'CoreFramework\Tests\Resolver\Command\TestsConsoleCommandResolver');
-// CFG: NEWS-DOWNLOAD-FILTER
+// CFG: NEWS-DOWNLOAD-FILTER-CLASS
$cfg->setConfigEntry('news_download_filter_class', 'CoreFramework\Filter\News\NewsDownloadFilter');
-// CFG: NEWS-PROCESS-FILTER
+// CFG: NEWS-PROCESS-FILTER-CLASS
$cfg->setConfigEntry('news_process_filter_class', 'CoreFramework\Filter\News\NewsProcessFilter');
// CFG: NEWS-READER-MAIN-CLASS
// CFG: TESTS-PHP-REQUIREMENTS-FILTER
$cfg->setConfigEntry('tests_php_requirements_filter_class', 'CoreFramework\Tests\Filter\Requirements\TestsPhpRequirementsFilter');
+
+// CFG: TEST-CONFIGURATION-CLASSES-LOADABLE-TEST-FILTER-CLASS
+$cfg->setConfigEntry('tests_configuration_classes_loadable_test_filter_class', 'CoreFramework\Tests\Filter\Configuration\Classes\TestConfigurationLoadableClassesFilter');
// CFG: FILE-OUTPUT-CLASS
$cfg->setConfigEntry('file_output_class', 'CoreFramework\Stream\Filesystem\FileIoStream');
-// CFG: EMAIL-VALIDATOR-FILTER
+// CFG: EMAIL-VALIDATOR-FILTER-CLASS
$cfg->setConfigEntry('email_validator_filter_class', 'EmailValidatorFilter');
-// CFG: USERNAME-VALIDATOR-FILTER
+// CFG: USERNAME-VALIDATOR-FILTER-CLASS
$cfg->setConfigEntry('username_validator_filter_class', 'UserNameValidatorFilter');
-// CFG: USERNAME-IS-GUEST-FILTER
+// CFG: USERNAME-IS-GUEST-FILTER-CLASS
$cfg->setConfigEntry('username_is_guest_filter_class', 'UserNameIsGuestFilter');
-// CFG: PASSWORD-VALIDATOR-FILTER
+// CFG: PASSWORD-VALIDATOR-FILTER-CLASS
$cfg->setConfigEntry('password_validator_filter_class', 'PasswordValidatorFilter');
-// CFG: RULES-ACCEPTED-FILTER
+// CFG: RULES-ACCEPTED-FILTER-CLASS
$cfg->setConfigEntry('rules_accepted_filter_class', 'RulesAcceptedFilter');
-// CFG: USERNAME-VERIFIER-FILTER
+// CFG: USERNAME-VERIFIER-FILTER-CLASS
$cfg->setConfigEntry('username_verifier_filter_class', 'UserNameVerifierFilter');
-// CFG: USER-GUEST-VERIFIER-FILTER
+// CFG: USER-GUEST-VERIFIER-FILTER-CLASS
$cfg->setConfigEntry('user_guest_verifier_filter_class', 'UserGuestVerifierFilter');
-// CFG: EMAIL-VERIFIER-FILTER
+// CFG: EMAIL-VERIFIER-FILTER-CLASS
$cfg->setConfigEntry('email_verifier_filter_class', 'EmailVerifierFilter');
-// CFG: PASSWORD-VERIFIER-FILTER
+// CFG: PASSWORD-VERIFIER-FILTER-CLASS
$cfg->setConfigEntry('password_verifier_filter_class', 'PasswordVerifierFilter');
-// CFG: PASSWD-GUEST-VERIFIER-FILTER
+// CFG: PASSWD-GUEST-VERIFIER-FILTER-CLASS
$cfg->setConfigEntry('passwd_guest_verifier_filter_class', 'PasswordGuestVerifierFilter');
-// CFG: EMAIL-CHANGE-FILTER
+// CFG: EMAIL-CHANGE-FILTER-CLASS
$cfg->setConfigEntry('email_change_filter_class', 'EmailChangeFilter');
-// CFG: PASSWORD-CHANGE-FILTER
+// CFG: PASSWORD-CHANGE-FILTER-CLASS
$cfg->setConfigEntry('password_change_filter_class', 'PasswordChangeFilter');
-// CFG: ACCOUNT-PASSWORD-FILTER
+// CFG: ACCOUNT-PASSWORD-FILTER-CLASS
$cfg->setConfigEntry('account_password_filter_class', 'AccountPasswordVerifierFilter');
-// CFG: USER-STATUS-FILTER
+// CFG: USER-STATUS-FILTER-CLASS
$cfg->setConfigEntry('user_status_filter_class', 'UserStatusVerifierFilter');
-// CFG: USER-UNCONFIRMED-FILTER
+// CFG: USER-UNCONFIRMED-FILTER-CLASS
$cfg->setConfigEntry('user_unconfirmed_filter_class', 'UserUnconfirmedVerifierFilter');
// CFG: CRYPTO-CLASS
// Import SPL stuff
use \stdClass;
+use \ReflectionClass;
/**
* The simulator system class is the super class of all other classes. This
// Execute the command
$commandInstance->execute($requestInstance, $responseInstance);
- // Execute *very* generic ppost filters
+ // Execute *very* generic post filters
$this->executePostFilters($requestInstance, $responseInstance);
} // END - if
// Execute the command
$commandInstance->execute($requestInstance, $responseInstance);
- // Run the pre filters
+ // Run the post filters
$this->executePostFilters($requestInstance, $responseInstance);
// Flush the response out