From 3585620470014d4e79bb36c85d44b608f2c1fcaa Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 11 Oct 2010 23:06:50 -0400 Subject: [PATCH] Adding a ghetto option parser to the testsuite shell. Still need to add in all the options from phpunit, and the other cake options. --- cake/console/libs/testsuite.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/cake/console/libs/testsuite.php b/cake/console/libs/testsuite.php index 58e36026f..b445170c4 100644 --- a/cake/console/libs/testsuite.php +++ b/cake/console/libs/testsuite.php @@ -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 *