Escape LegacyDevelopmentTest output
This commit is contained in:
parent
59e060cd39
commit
ba1c658b92
|
@ -26,7 +26,13 @@ class LegacyDevelopment extends Legacy
|
|||
'file' => $file . ':' . $e->getLine(),
|
||||
'stacktrace' => $this->formatStackTrace($e->getTrace()),
|
||||
];
|
||||
|
||||
ob_start(function (string $buffer) {
|
||||
return htmlspecialchars($buffer);
|
||||
});
|
||||
var_dump($data);
|
||||
ob_end_flush();
|
||||
|
||||
echo '</pre>';
|
||||
}
|
||||
|
||||
|
|
|
@ -19,10 +19,10 @@ class LegacyDevelopmentTest extends TestCase
|
|||
$handler = new LegacyDevelopment();
|
||||
/** @var Request|MockObject $request */
|
||||
$request = $this->createMock(Request::class);
|
||||
$exception = new ErrorException('Lorem Ipsum', 4242, 1, 'foo.php', 9999);
|
||||
$exception = new ErrorException('Lorem <b>Ipsum</b>', 4242, 1, 'foo.php', 9999);
|
||||
|
||||
$regex = sprintf(
|
||||
'%%<pre.*>.*ErrorException.*4242.*Lorem Ipsum.*%s.*%s.*%s.*</pre>%%is',
|
||||
'%%<pre.*>.*ErrorException.*4242.*Lorem <b>Ipsum</b>.*%s.*%s.*%s.*</pre>%%is',
|
||||
'foo.php',
|
||||
9999,
|
||||
__FUNCTION__
|
||||
|
|
Loading…
Reference in New Issue