| @@ 80-90 (lines=11) @@ | ||
| 77 | $this->guy->seeInOutput("b: '7'"); |
|
| 78 | } |
|
| 79 | ||
| 80 | public function testSettingConfigurationFromCommandOptions() |
|
| 81 | { |
|
| 82 | $argv = ['placeholder', 'test:simple-list', '-D', 'config.key=value']; |
|
| 83 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
| 84 | ||
| 85 | $this->guy->seeInOutput("a: '1'"); |
|
| 86 | $this->guy->seeInOutput("b: '2'"); |
|
| 87 | ||
| 88 | $actual = \Robo\Robo::config()->get('config.key'); |
|
| 89 | $this->assertEquals('value', $actual); |
|
| 90 | } |
|
| 91 | ||
| 92 | public function testWithConfigLoader() |
|
| 93 | { |
|
| @@ 227-238 (lines=12) @@ | ||
| 224 | $this->assertEquals(0, $result); |
|
| 225 | } |
|
| 226 | ||
| 227 | public function testRunnerVerbosityThresholdVerbose() |
|
| 228 | { |
|
| 229 | $argv = ['placeholder', 'test:verbosity-threshold', '-v']; |
|
| 230 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
| 231 | ||
| 232 | $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); |
|
| 233 | $this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); |
|
| 234 | $this->guy->doNotSeeInOutput('very verbose or higher'); |
|
| 235 | $this->assertEquals(0, $result); |
|
| 236 | } |
|
| 237 | ||
| 238 | public function testRunnerVerbosityThresholdVeryVerbose() |
|
| 239 | { |
|
| 240 | $argv = ['placeholder', 'test:verbosity-threshold', '-vv']; |
|
| 241 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
| @@ 238-249 (lines=12) @@ | ||
| 235 | $this->assertEquals(0, $result); |
|
| 236 | } |
|
| 237 | ||
| 238 | public function testRunnerVerbosityThresholdVeryVerbose() |
|
| 239 | { |
|
| 240 | $argv = ['placeholder', 'test:verbosity-threshold', '-vv']; |
|
| 241 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
| 242 | ||
| 243 | $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); |
|
| 244 | $this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); |
|
| 245 | $this->guy->seeInOutput("Running echo very verbose or higher\nvery verbose or higher"); |
|
| 246 | $this->assertEquals(0, $result); |
|
| 247 | } |
|
| 248 | ||
| 249 | public function testRunnerDebugOutput() |
|
| 250 | { |
|
| 251 | $argv = ['placeholder', 'test:verbosity', '-vvv']; |
|
| 252 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|