mirror of
https://github.com/Seldaek/monolog.git
synced 2025-08-07 13:46:38 +02:00
Change Logger::setTimezone to accept a DateTimeZone object, refs #566
This commit is contained in:
@@ -434,13 +434,13 @@ class LoggerTest extends \PHPUnit_Framework_TestCase
|
||||
$logger->pushHandler($handler);
|
||||
$logger->info('test');
|
||||
list($record) = $handler->getRecords();
|
||||
$this->assertEquals($tz, $record['datetime']->getTimezone()->getName());
|
||||
$this->assertEquals($tz, $record['datetime']->getTimezone());
|
||||
}
|
||||
|
||||
public function setTimezoneProvider()
|
||||
{
|
||||
return array_map(
|
||||
function ($tz) { return array($tz); },
|
||||
function ($tz) { return array(new \DateTimeZone($tz)); },
|
||||
\DateTimeZone::listIdentifiers()
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user