diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index fa371749..a65cea91 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -767,4 +767,4 @@ PASS Tests\Visual\Version ✓ visual snapshot of help command output - Tests: 4 incomplete, 1 todo, 18 skipped, 511 passed (1286 assertions) + Tests: 4 incomplete, 1 todo, 18 skipped, 511 passed (1286 assertions) \ No newline at end of file diff --git a/tests/Visual/Success.php b/tests/Visual/Success.php index d8928552..41cbcdce 100644 --- a/tests/Visual/Success.php +++ b/tests/Visual/Success.php @@ -27,10 +27,12 @@ test('visual snapshot of test suite on success', function () { }; if (getenv('REBUILD_SNAPSHOTS')) { - // Strip time from end of snapshot - $outputContent = preg_replace('/Time\: \s+\d+\.\d+s\s+/m', '', $output()); + $outputContent = explode("\n", $output()); + array_pop($outputContent); + array_pop($outputContent); + array_pop($outputContent); - file_put_contents($snapshot, $outputContent); + file_put_contents($snapshot, implode("\n", $outputContent)); } elseif (! getenv('EXCLUDE')) { $output = explode("\n", $output()); array_pop($output);