| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function allDomainsAreProperlyPrinted(): void |
||
| 34 | { |
||
| 35 | $expectedOutput = <<<OUTPUT |
||
| 36 | +---------+------------+ |
||
| 37 | | Domain | Is default | |
||
| 38 | +---------+------------+ |
||
| 39 | | foo.com | Yes | |
||
| 40 | | bar.com | No | |
||
| 41 | | baz.com | No | |
||
| 42 | +---------+------------+ |
||
| 43 | |||
| 44 | OUTPUT; |
||
| 45 | $listDomains = $this->domainService->listDomainsWithout('foo.com')->willReturn([ |
||
| 46 | new Domain('bar.com'), |
||
| 47 | new Domain('baz.com'), |
||
| 48 | ]); |
||
| 49 | |||
| 50 | $this->commandTester->execute([]); |
||
| 51 | |||
| 52 | self::assertEquals($expectedOutput, $this->commandTester->getDisplay()); |
||
| 53 | self::assertEquals(ExitCodes::EXIT_SUCCESS, $this->commandTester->getStatusCode()); |
||
| 54 | $listDomains->shouldHaveBeenCalledOnce(); |
||
| 55 | } |
||
| 57 |