| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 19 | public function testLoggerMiddlewareLogsOnlyLoggableCommands(): void |
||
| 20 | { |
||
| 21 | $this->commandBus->handle(new Stubs\Commands\PublishDraft()); |
||
| 22 | $this->commandBus->handle(new Stubs\Commands\ReserveRoom()); |
||
| 23 | $this->assertEquals([ |
||
| 24 | 'level' => 'info', |
||
| 25 | 'message' => 'Trying to publish a draft', |
||
| 26 | 'context' => ['draftData' => (new Stubs\Commands\PublishDraft())->getDraftData()] |
||
| 27 | ], $this->testLogger->records[0]); |
||
| 28 | |||
| 29 | $this->assertCount(1, $this->testLogger->records); |
||
| 30 | } |
||
| 32 |