| Total Complexity | 3 |
| Total Lines | 46 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | class PhUmlHelpOptionTest extends TestCase |
||
| 11 | { |
||
| 12 | private $help = <<<HELP |
||
| 13 | phUML Version 0.2 (Jakob Westhoff <[email protected]>) |
||
| 14 | Usage: phuml [-h|-l] [OPTIONS] <DIRECTORY> <PROCESSOR> [PROCESSOR OPTIONS] ... <OUTFILE> |
||
| 15 | |||
| 16 | Commands: |
||
| 17 | -h Display this help text |
||
| 18 | -l List all available processors |
||
| 19 | |||
| 20 | Options: |
||
| 21 | -r Scan given directorie recursively |
||
| 22 | |||
| 23 | Example: |
||
| 24 | phuml -r ./ -graphviz -createAssociations false -neato out.png |
||
| 25 | |||
| 26 | This example will scan the current directory recursively for php files. |
||
| 27 | Send them to the "dot" processor which will process them with the option |
||
| 28 | "createAssociations" set to false. After that it will be send to the neato |
||
| 29 | processor and saved to the file out.png |
||
| 30 | |||
| 31 | |||
| 32 | HELP; |
||
| 33 | |||
| 34 | /** @test */ |
||
| 35 | function it_displays_help_if_option_h_is_provided() |
||
| 40 | } |
||
| 41 | |||
| 42 | /** @test */ |
||
| 43 | function it_displays_help_if_no_arguments_are_provided() |
||
| 48 | } |
||
| 49 | |||
| 50 | /** @test */ |
||
| 51 | function it_displays_help_if_an_invalid_directory_is_provided() |
||
| 58 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.