@@ 44-54 (lines=11) @@ | ||
41 | $this->guy->seeInOutput("b: '3'"); |
|
42 | } |
|
43 | ||
44 | public function testWithConfigurationButNoOptions() |
|
45 | { |
|
46 | \Robo\Robo::config()->set('command.test.simple-list.options.a', '4'); |
|
47 | \Robo\Robo::config()->set('command.test.simple-list.options.b', '5'); |
|
48 | ||
49 | $argv = ['placeholder', 'test:simple-list']; |
|
50 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
51 | ||
52 | $this->guy->seeInOutput("a: '4'"); |
|
53 | $this->guy->seeInOutput("b: '5'"); |
|
54 | } |
|
55 | ||
56 | public function testHelpWithoutConfiguration() |
|
57 | { |
|
@@ 65-75 (lines=11) @@ | ||
62 | $this->guy->seeInOutput('[default: "2"]'); |
|
63 | } |
|
64 | ||
65 | public function testHelpWithConfigurationButNoOptions() |
|
66 | { |
|
67 | \Robo\Robo::config()->set('command.test.simple-list.options.a', '4'); |
|
68 | \Robo\Robo::config()->set('command.test.simple-list.options.b', '5'); |
|
69 | ||
70 | $argv = ['placeholder', 'help', 'test:simple-list']; |
|
71 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
72 | ||
73 | $this->guy->seeInOutput('[default: "4"]'); |
|
74 | $this->guy->seeInOutput('[default: "5"]'); |
|
75 | } |
|
76 | ||
77 | public function testWithConfigurationAndOptionOverride() |
|
78 | { |
|
@@ 77-87 (lines=11) @@ | ||
74 | $this->guy->seeInOutput('[default: "5"]'); |
|
75 | } |
|
76 | ||
77 | public function testWithConfigurationAndOptionOverride() |
|
78 | { |
|
79 | \Robo\Robo::config()->set('command.test.simple-list.options.a', '4'); |
|
80 | \Robo\Robo::config()->set('command.test.simple-list.options.b', '5'); |
|
81 | ||
82 | $argv = ['placeholder', 'test:simple-list', '--b=6']; |
|
83 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
84 | ||
85 | $this->guy->seeInOutput("a: '4'"); |
|
86 | $this->guy->seeInOutput("b: '6'"); |
|
87 | } |
|
88 | ||
89 | public function testWithConfigurationFallbacks() |
|
90 | { |
|
@@ 89-99 (lines=11) @@ | ||
86 | $this->guy->seeInOutput("b: '6'"); |
|
87 | } |
|
88 | ||
89 | public function testWithConfigurationFallbacks() |
|
90 | { |
|
91 | \Robo\Robo::config()->set('command.test.simple-list.options.a', '4'); |
|
92 | \Robo\Robo::config()->set('command.test.options.b', '7'); |
|
93 | ||
94 | $argv = ['placeholder', 'test:simple-list']; |
|
95 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
96 | ||
97 | $this->guy->seeInOutput("a: '4'"); |
|
98 | $this->guy->seeInOutput("b: '7'"); |
|
99 | } |
|
100 | ||
101 | public function testSettingConfigurationFromCommandOptions() |
|
102 | { |