public function testWarningLogsCorrectly() { $config = new LoggerConfig(); $logger = new Logger($config); $expected = 'WARNING - ' . date('Y-m-d') . ' --> Test message'; $logger->warning('Test message'); $logs = TestHandler::getLogs(); $this->assertEquals(1, count($logs)); $this->assertEquals($expected, $logs[0]); }