@@ 24-32 (lines=9) @@ | ||
21 | $this->runner = new \Robo\Runner('\Robo\RoboFileFixture'); |
|
22 | } |
|
23 | ||
24 | public function testNoOptionsNoConfiguration() |
|
25 | { |
|
26 | // Run without any config and without any options |
|
27 | $argv = ['placeholder', 'test:simple-list']; |
|
28 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
29 | ||
30 | $this->guy->seeInOutput("a: '1'"); |
|
31 | $this->guy->seeInOutput("b: '2'"); |
|
32 | } |
|
33 | ||
34 | public function testOptionsButNoConfiguration() |
|
35 | { |
|
@@ 34-42 (lines=9) @@ | ||
31 | $this->guy->seeInOutput("b: '2'"); |
|
32 | } |
|
33 | ||
34 | public function testOptionsButNoConfiguration() |
|
35 | { |
|
36 | // Set one option, but provide no config |
|
37 | $argv = ['placeholder', 'test:simple-list', '--b=3']; |
|
38 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
39 | ||
40 | $this->guy->seeInOutput("a: '1'"); |
|
41 | $this->guy->seeInOutput("b: '3'"); |
|
42 | } |
|
43 | ||
44 | public function testWithConfigurationButNoOptions() |
|
45 | { |
|
@@ 56-63 (lines=8) @@ | ||
53 | $this->guy->seeInOutput("b: '5'"); |
|
54 | } |
|
55 | ||
56 | public function testHelpWithoutConfiguration() |
|
57 | { |
|
58 | $argv = ['placeholder', 'help', 'test:simple-list']; |
|
59 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
60 | ||
61 | $this->guy->seeInOutput('[default: "1"]'); |
|
62 | $this->guy->seeInOutput('[default: "2"]'); |
|
63 | } |
|
64 | ||
65 | public function testHelpWithConfigurationButNoOptions() |
|
66 | { |