Skip to content

Commit 2bbf380

Browse files
committed
Remove duplicated code in testsuite shell.
1 parent 6769824 commit 2bbf380

File tree

1 file changed

+1
-111
lines changed

1 file changed

+1
-111
lines changed

lib/Cake/Console/Command/TestsuiteShell.php

Lines changed: 1 addition & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -38,121 +38,11 @@ class TestsuiteShell extends TestShell {
3838
* @return void
3939
*/
4040
public function getOptionParser() {
41-
$parser = new ConsoleOptionParser($this->name);
41+
$parser = parent::getOptionParser();
4242
$parser->description(array(
4343
__d('cake_console', 'The CakePHP Testsuite allows you to run test cases from the command line'),
4444
__d('cake_console', '<warning>This shell is for backwards-compatibility only</warning>'),
4545
__d('cake_console', 'use the test shell instead')
46-
))->addArgument('category', array(
47-
'help' => __d('cake_console', 'app, core or name of a plugin.'),
48-
'required' => true
49-
))->addArgument('file', array(
50-
'help' => __d('cake_console', 'file name with folder prefix and without the test.php suffix.'),
51-
'required' => false,
52-
))->addOption('log-junit', array(
53-
'help' => __d('cake_console', '<file> Log test execution in JUnit XML format to file.'),
54-
'default' => false
55-
))->addOption('log-json', array(
56-
'help' => __d('cake_console', '<file> Log test execution in JSON format to file.'),
57-
'default' => false
58-
))->addOption('log-tap', array(
59-
'help' => __d('cake_console', '<file> Log test execution in TAP format to file.'),
60-
'default' => false
61-
))->addOption('log-dbus', array(
62-
'help' => __d('cake_console', 'Log test execution to DBUS.'),
63-
'default' => false
64-
))->addOption('coverage-html', array(
65-
'help' => __d('cake_console', '<dir> Generate code coverage report in HTML format.'),
66-
'default' => false
67-
))->addOption('coverage-clover', array(
68-
'help' => __d('cake_console', '<file> Write code coverage data in Clover XML format.'),
69-
'default' => false
70-
))->addOption('testdox-html', array(
71-
'help' => __d('cake_console', '<file> Write agile documentation in HTML format to file.'),
72-
'default' => false
73-
))->addOption('testdox-text', array(
74-
'help' => __d('cake_console', '<file> Write agile documentation in Text format to file.'),
75-
'default' => false
76-
))->addOption('filter', array(
77-
'help' => __d('cake_console', '<pattern> Filter which tests to run.'),
78-
'default' => false
79-
))->addOption('group', array(
80-
'help' => __d('cake_console', '<name> Only runs tests from the specified group(s).'),
81-
'default' => false
82-
))->addOption('exclude-group', array(
83-
'help' => __d('cake_console', '<name> Exclude tests from the specified group(s).'),
84-
'default' => false
85-
))->addOption('list-groups', array(
86-
'help' => __d('cake_console', 'List available test groups.'),
87-
'boolean' => true
88-
))->addOption('loader', array(
89-
'help' => __d('cake_console', 'TestSuiteLoader implementation to use.'),
90-
'default' => false
91-
))->addOption('repeat', array(
92-
'help' => __d('cake_console', '<times> Runs the test(s) repeatedly.'),
93-
'default' => false
94-
))->addOption('tap', array(
95-
'help' => __d('cake_console', 'Report test execution progress in TAP format.'),
96-
'boolean' => true
97-
))->addOption('testdox', array(
98-
'help' => __d('cake_console', 'Report test execution progress in TestDox format.'),
99-
'default' => false,
100-
'boolean' => true
101-
))->addOption('no-colors', array(
102-
'help' => __d('cake_console', 'Do not use colors in output.'),
103-
'boolean' => true
104-
))->addOption('stderr', array(
105-
'help' => __d('cake_console', 'Write to STDERR instead of STDOUT.'),
106-
'boolean' => true
107-
))->addOption('stop-on-error', array(
108-
'help' => __d('cake_console', 'Stop execution upon first error or failure.'),
109-
'boolean' => true
110-
))->addOption('stop-on-failure', array(
111-
'help' => __d('cake_console', 'Stop execution upon first failure.'),
112-
'boolean' => true
113-
))->addOption('stop-on-skipped ', array(
114-
'help' => __d('cake_console', 'Stop execution upon first skipped test.'),
115-
'boolean' => true
116-
))->addOption('stop-on-incomplete', array(
117-
'help' => __d('cake_console', 'Stop execution upon first incomplete test.'),
118-
'boolean' => true
119-
))->addOption('strict', array(
120-
'help' => __d('cake_console', 'Mark a test as incomplete if no assertions are made.'),
121-
'boolean' => true
122-
))->addOption('wait', array(
123-
'help' => __d('cake_console', 'Waits for a keystroke after each test.'),
124-
'boolean' => true
125-
))->addOption('process-isolation', array(
126-
'help' => __d('cake_console', 'Run each test in a separate PHP process.'),
127-
'boolean' => true
128-
))->addOption('no-globals-backup', array(
129-
'help' => __d('cake_console', 'Do not backup and restore $GLOBALS for each test.'),
130-
'boolean' => true
131-
))->addOption('static-backup ', array(
132-
'help' => __d('cake_console', 'Backup and restore static attributes for each test.'),
133-
'boolean' => true
134-
))->addOption('syntax-check', array(
135-
'help' => __d('cake_console', 'Try to check source files for syntax errors.'),
136-
'boolean' => true
137-
))->addOption('bootstrap', array(
138-
'help' => __d('cake_console', '<file> A "bootstrap" PHP file that is run before the tests.'),
139-
'default' => false
140-
))->addOption('configuration', array(
141-
'help' => __d('cake_console', '<file> Read configuration from XML file.'),
142-
'default' => false
143-
))->addOption('no-configuration', array(
144-
'help' => __d('cake_console', 'Ignore default configuration file (phpunit.xml).'),
145-
'boolean' => true
146-
))->addOption('include-path', array(
147-
'help' => __d('cake_console', '<path(s)> Prepend PHP include_path with given path(s).'),
148-
'default' => false
149-
))->addOption('directive', array(
150-
'help' => __d('cake_console', 'key[=value] Sets a php.ini value.'),
151-
'default' => false
152-
))->addOption('fixture', array(
153-
'help' => __d('cake_console', 'Choose a custom fixture manager.'),
154-
))->addOption('debug', array(
155-
'help' => __d('cake_console', 'Enable full output of testsuite. (supported in PHPUnit 3.6.0 and greater)'),
15646
));
15747

15848
return $parser;

0 commit comments

Comments
 (0)