| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function testExecute(): void |
||
| 29 | { |
||
| 30 | $io = new NullIO(); |
||
| 31 | $config = $this->createConfigMock(); |
||
| 32 | $action = $this->createActionConfigMock(); |
||
| 33 | $action->method('getOptions')->willReturn(new Options(['message' => 'what?'])); |
||
| 34 | $repo = $this->createRepositoryMock(); |
||
| 35 | |||
| 36 | $exe = new AskConfirmation(); |
||
| 37 | $exe->execute($config, $io, $repo, $action); |
||
| 38 | |||
| 39 | $handlers = AskConfirmation::getEventHandlers($action); |
||
| 40 | $this->assertFalse(empty($handlers)); |
||
| 41 | $this->assertInstanceOf(EventHandler\AskConfirmation::class, $handlers['onHookSuccess'][0]); |
||
| 42 | } |
||
| 44 |