mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
tests: fixes visual testing on windows
This commit is contained in:
@ -7,7 +7,11 @@ $run = function (string $target, $decorated = false) {
|
|||||||
|
|
||||||
$process->run();
|
$process->run();
|
||||||
|
|
||||||
return $decorated ? $process->getOutput() : preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput());
|
$output = $decorated ? $process->getOutput() : preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput());
|
||||||
|
|
||||||
|
$output = strtoupper(substr(PHP_OS, 0, 3)) === 'WIN' ? str_replace("\n", "\r\n", $output) : $output;
|
||||||
|
|
||||||
|
return $output;
|
||||||
};
|
};
|
||||||
|
|
||||||
$snapshot = function ($name) {
|
$snapshot = function ($name) {
|
||||||
|
|||||||
Reference in New Issue
Block a user