1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-08-06 13:16:39 +02:00

Fixed array() usage and added HHVM_VERSION check

This commit is contained in:
Thomas Ploch
2014-12-16 13:35:22 +01:00
parent dca8f5841f
commit e66ba56cc0

View File

@@ -169,6 +169,10 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
public function testExceptionTraceWithArgs() public function testExceptionTraceWithArgs()
{ {
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('Not supported in HHVM since it detects errors differently');
}
// This happens i.e. in React promises or Guzzle streams where stream wrappers are registered // This happens i.e. in React promises or Guzzle streams where stream wrappers are registered
// and no file or line are included in the trace because it's treated as internal function // and no file or line are included in the trace because it's treated as internal function
set_error_handler(function ($errno, $errstr, $errfile, $errline) { set_error_handler(function ($errno, $errstr, $errfile, $errline) {
@@ -187,7 +191,7 @@ class NormalizerFormatterTest extends \PHPUnit_Framework_TestCase
} }
$formatter = new NormalizerFormatter(); $formatter = new NormalizerFormatter();
$record = ['context' => ['exception' => $e]]; $record = array('context' => array('exception' => $e));
$result = $formatter->format($record); $result = $formatter->format($record);
$this->assertRegExp( $this->assertRegExp(