Exemplo n.º 1
0
 public function testNewDateFormat()
 {
     $resource = fopen('php://memory', 'a');
     $stream = new Stream('name', $resource);
     $stream->setDateFormat('d/m/Y');
     $stream->setMessageFormat('{datetime}');
     $stream->log(LogLevel::ALERT, 'Test Log Message');
     rewind($resource);
     $logMessage = fgets($resource);
     $this->assertStringMatchesFormat('%d/%d/%d' . PHP_EOL, $logMessage);
 }