Adding a ghetto option parser to the testsuite shell. Still need to add in all the options from phpunit, and the other cake options.

This commit is contained in:
mark_story 2010-10-11 23:06:50 -04:00
parent 2af684cbec
commit 3585620470

View file

@ -28,6 +28,26 @@ class TestSuiteShell extends Shell {
*/
protected $_dispatcher = null;
/**
* get the option parser for the test suite.
*
* @return void
*/
public function getOptionParser() {
$parser = new ConsoleOptionParser($this->name, false);
$parser->description(array(
'The CakPHP Testsuite allows you to run test cases from the command line',
'If run with no command line arguments, a list of available core test cases will be shown'
))->addArgument('category', array(
'help' => __('app, core or name of a plugin.'),
'required' => true
))->addArgument('file', array(
'help' => __('file name with folder prefix and without the test.php suffix.'),
'required' => true,
));
return $parser;
}
/**
* Initialization method installs Simpletest and loads all plugins
*