| Conditions | 1 |
| Paths | 1 |
| Total Lines | 20 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function testLoadsCommands(): void |
||
| 16 | { |
||
| 17 | $containerMock = $this->createMock(ContainerBuilder::class); |
||
| 18 | $cliMock = $this->createMock(Application::class); |
||
| 19 | $commandMock = $this->createMock(Command::class); |
||
| 20 | |||
| 21 | $containerMock |
||
| 22 | ->expects($this->once()) |
||
| 23 | ->method('findTaggedServiceIds') |
||
| 24 | ->with(CommandLoader::COMMAND_TAG) |
||
| 25 | ->willReturn([1 => CommandLoader::COMMAND_TAG]); |
||
| 26 | $containerMock |
||
| 27 | ->expects($this->once()) |
||
| 28 | ->method('get') |
||
| 29 | ->with(1) |
||
| 30 | ->willReturn($commandMock); |
||
| 31 | |||
| 32 | $cliMock->expects($this->once())->method('add')->with($commandMock); |
||
| 33 | |||
| 34 | (new CommandLoader())->load($cliMock, $containerMock); |
||
| 35 | } |
||
| 37 |