mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-13 00:24:10 +02:00
Set default date format to have a timezone, fixes #196
This commit is contained in:
@@ -38,7 +38,7 @@ class DoctrineCouchDBHandlerTest extends TestCase
|
||||
'level' => Logger::WARNING,
|
||||
'level_name' => 'WARNING',
|
||||
'channel' => 'test',
|
||||
'datetime' => $record['datetime']->format('Y-m-d H:i:s'),
|
||||
'datetime' => (string) $record['datetime'],
|
||||
'extra' => array(),
|
||||
);
|
||||
|
||||
|
@@ -37,7 +37,7 @@ class LogEntriesHandlerTest extends TestCase
|
||||
fseek($this->res, 0);
|
||||
$content = fread($this->res, 1024);
|
||||
|
||||
$this->assertRegexp('/testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] test.CRITICAL: Critical write test/', $content);
|
||||
$this->assertRegexp('/testToken \[\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+00:00\] test.CRITICAL: Critical write test/', $content);
|
||||
}
|
||||
|
||||
public function testWriteBatchContent()
|
||||
@@ -53,7 +53,7 @@ class LogEntriesHandlerTest extends TestCase
|
||||
fseek($this->res, 0);
|
||||
$content = fread($this->res, 1024);
|
||||
|
||||
$this->assertRegexp('/(testToken \[\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}\] .* \[\] \[\]\n){3}/', $content);
|
||||
$this->assertRegexp('/(testToken \[\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6}\+00:00\] .* \[\] \[\]\n){3}/', $content);
|
||||
}
|
||||
|
||||
private function createHandler()
|
||||
|
@@ -64,7 +64,7 @@ class MailHandlerTest extends TestCase
|
||||
|
||||
$record = $this->getRecord();
|
||||
$records = array($record);
|
||||
$records[0]['formatted'] = '['.$record['datetime']->format('Y-m-d H:i:s').'] test.WARNING: test [] []'."\n";
|
||||
$records[0]['formatted'] = '['.$record['datetime'].'] test.WARNING: test [] []'."\n";
|
||||
|
||||
$handler->expects($this->once())
|
||||
->method('send')
|
||||
|
Reference in New Issue
Block a user