| Conditions | 1 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function testOptions(): void |
||
| 19 | { |
||
| 20 | $core = $this->getCore(new StaticLocator([ |
||
| 21 | OptionalCommand::class |
||
| 22 | ])); |
||
| 23 | |||
| 24 | $this->assertSame( |
||
| 25 | 'no option', |
||
| 26 | $core->run('optional')->getOutput()->fetch() |
||
|
|
|||
| 27 | ); |
||
| 28 | |||
| 29 | $this->assertSame( |
||
| 30 | 'hello', |
||
| 31 | $core->run('optional', ['-o' => true, 'arg' => 'hello'])->getOutput()->fetch() |
||
| 32 | ); |
||
| 33 | |||
| 34 | $this->assertSame( |
||
| 35 | 0, |
||
| 36 | $core->run('optional', ['-o' => true, 'arg' => 'hello'])->getCode() |
||
| 37 | ); |
||
| 40 |