|
@@ 276-287 (lines=12) @@
|
| 273 |
|
$this->assertEquals(0, $result); |
| 274 |
|
} |
| 275 |
|
|
| 276 |
|
public function testRunnerVerbosityThresholdVerbose() |
| 277 |
|
{ |
| 278 |
|
$argv = ['placeholder', 'test:verbosity-threshold', '-v']; |
| 279 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
| 280 |
|
|
| 281 |
|
$this->guy->seeInOutput('This command will print more information at higher verbosity levels'); |
| 282 |
|
$this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); |
| 283 |
|
$this->guy->doNotSeeInOutput('very verbose or higher'); |
| 284 |
|
$this->assertEquals(0, $result); |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
public function testRunnerVerbosityThresholdVeryVerbose() |
| 288 |
|
{ |
| 289 |
|
$argv = ['placeholder', 'test:verbosity-threshold', '-vv']; |
| 290 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
@@ 287-298 (lines=12) @@
|
| 284 |
|
$this->assertEquals(0, $result); |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
public function testRunnerVerbosityThresholdVeryVerbose() |
| 288 |
|
{ |
| 289 |
|
$argv = ['placeholder', 'test:verbosity-threshold', '-vv']; |
| 290 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
| 291 |
|
|
| 292 |
|
$this->guy->seeInOutput('This command will print more information at higher verbosity levels'); |
| 293 |
|
$this->guy->seeInOutput("Running echo verbose or higher\nverbose or higher"); |
| 294 |
|
$this->guy->seeInOutput("Running echo very verbose or higher\nvery verbose or higher"); |
| 295 |
|
$this->assertEquals(0, $result); |
| 296 |
|
} |
| 297 |
|
|
| 298 |
|
public function testRunnerDebugOutput() |
| 299 |
|
{ |
| 300 |
|
$argv = ['placeholder', 'test:verbosity', '-vvv']; |
| 301 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
|
@@ 357-367 (lines=11) @@
|
| 354 |
|
$this->guy->seeInOutput("b: '6'"); |
| 355 |
|
} |
| 356 |
|
|
| 357 |
|
public function testSettingConfigurationFromCommandOptions() |
| 358 |
|
{ |
| 359 |
|
$argv = ['placeholder', 'test:simple-list', '-D', 'config.key=value']; |
| 360 |
|
$result = $this->runner->execute($argv, null, null, $this->guy->capturedOutputStream()); |
| 361 |
|
|
| 362 |
|
$this->guy->seeInOutput("a: '1'"); |
| 363 |
|
$this->guy->seeInOutput("b: '2'"); |
| 364 |
|
|
| 365 |
|
$actual = \Robo\Robo::config()->get('config.key'); |
| 366 |
|
$this->assertEquals('value', $actual); |
| 367 |
|
} |
| 368 |
|
|
| 369 |
|
public function testWithConfigLoader() |
| 370 |
|
{ |