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