// }}} // {{{ paths include_once 'medick/Object.php'; include_once 'medick/Exception.php'; include_once 'medick/Registry.php'; include_once 'medick/util.php'; include_once 'medick/io/Folder.php'; include_once 'medick/ConsoleOptions.php'; // include_once('simpletest/web_tester.php'); include_once 'simpletest/unit_tester.php'; include_once 'simpletest/reporter.php'; include_once 'configurator/LoggerConfigurator.php'; include_once 'logger/Logger.php'; // }}} // {{{ configure console $options = new ConsoleOptions(); $options->setNoValueFor('debug', '-d', '--debug'); $options->load(isset($argv) ? $argv : $_SERVER['argv']); $options->alias('debug', '-d, --debug'); // }}} // {{{ logger. $logger = new Logger(new LoggerConfigurator()); // }}} $test = new GroupTest("=== Medick Framework Unit Tests ==="); $test_files = Folder::recursiveFindRelative('.', 'test', 'Test.php'); foreach ($test_files as $file) { if ($options->has('debug')) { $logger->debug('Adding test file: ' . $file); } $test->addTestFile($file); }
function usage(ConsoleOptions $c) { echo sprintf("%s, usage:\n\n * generate [generator]\n * task [a task]\n\n\nGenerators:\n * app [name] will generate a medick2 skeleton application in [name]\n", $c->getScriptName()); exit; }