| Total Complexity | 3 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class DbHandlerTest extends TestCase |
||
| 15 | { |
||
| 16 | private LogRecord $record; |
||
| 17 | |||
| 18 | protected function setUp(): void |
||
| 25 | ); |
||
| 26 | } |
||
| 27 | |||
| 28 | public function testHandleDoesNothingWithoutEnabling(): void |
||
| 29 | { |
||
| 30 | $logRepository = $this->createMock(LogRepository::class); |
||
| 31 | $logRepository->expects(self::never()) |
||
| 32 | ->method('log') |
||
| 33 | ->with($this->record); |
||
| 34 | |||
| 35 | $handler = new DbHandler(fn () => $logRepository); |
||
| 36 | $handler->handle($this->record); |
||
| 37 | } |
||
| 38 | |||
| 39 | public function testHandleWriteIfEnabled(): void |
||
| 49 | } |
||
| 50 | } |
||
| 51 |