| @@ 101-111 (lines=11) @@ | ||
| 98 | $this->guy->seeInOutput("b: '7'"); |
|
| 99 | } |
|
| 100 | ||
| 101 | public function testSettingConfigurationFromCommandOptions() |
|
| 102 | { |
|
| 103 | $argv = ['placeholder', 'test:simple-list', '-D', 'config.key=value']; |
|
| 104 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
| 105 | ||
| 106 | $this->guy->seeInOutput("a: '1'"); |
|
| 107 | $this->guy->seeInOutput("b: '2'"); |
|
| 108 | ||
| 109 | $actual = \Robo\Robo::config()->get('config.key'); |
|
| 110 | $this->assertEquals('value', $actual); |
|
| 111 | } |
|
| 112 | ||
| 113 | public function testWithConfigLoader() |
|
| 114 | { |
|
| @@ 249-258 (lines=10) @@ | ||
| 246 | $this->assertEquals(0, $result); |
|
| 247 | } |
|
| 248 | ||
| 249 | public function testRunnerVerbosityThresholdVerbose() |
|
| 250 | { |
|
| 251 | $argv = ['placeholder', 'test:verbosity-threshold', '-v']; |
|
| 252 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
| 253 | ||
| 254 | $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); |
|
| 255 | $this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); |
|
| 256 | $this->guy->doNotSeeInOutput('very verbose or higher'); |
|
| 257 | $this->assertEquals(0, $result); |
|
| 258 | } |
|
| 259 | ||
| 260 | public function testRunnerVerbosityThresholdVeryVerbose() |
|
| 261 | { |
|
| @@ 260-269 (lines=10) @@ | ||
| 257 | $this->assertEquals(0, $result); |
|
| 258 | } |
|
| 259 | ||
| 260 | public function testRunnerVerbosityThresholdVeryVerbose() |
|
| 261 | { |
|
| 262 | $argv = ['placeholder', 'test:verbosity-threshold', '-vv']; |
|
| 263 | $result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
| 264 | ||
| 265 | $this->guy->seeInOutput('This command will print more information at higher verbosity levels'); |
|
| 266 | $this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); |
|
| 267 | $this->guy->seeInOutput("Running echo very verbose or higher\nvery verbose or higher"); |
|
| 268 | $this->assertEquals(0, $result); |
|
| 269 | } |
|
| 270 | ||
| 271 | public function testRunnerDebugOutput() |
|
| 272 | { |
|