mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Migrates to Pint
This commit is contained in:
@ -2,13 +2,13 @@
|
||||
|
||||
test('visual snapshot of test suite on success', function () {
|
||||
$testsPath = dirname(__DIR__);
|
||||
$snapshot = implode(DIRECTORY_SEPARATOR, [
|
||||
$snapshot = implode(DIRECTORY_SEPARATOR, [
|
||||
$testsPath,
|
||||
'.snapshots',
|
||||
'success.txt',
|
||||
]);
|
||||
|
||||
$output = function () use ($testsPath) {
|
||||
$output = function () use ($testsPath) {
|
||||
$process = (new Symfony\Component\Process\Process(
|
||||
['php', 'bin/pest'],
|
||||
dirname($testsPath),
|
||||
@ -31,12 +31,12 @@ test('visual snapshot of test suite on success', function () {
|
||||
$outputContent = preg_replace('/Time\: \s+\d+\.\d+s\s+/m', '', $output());
|
||||
|
||||
file_put_contents($snapshot, $outputContent);
|
||||
} elseif (!getenv('EXCLUDE')) {
|
||||
} elseif (! getenv('EXCLUDE')) {
|
||||
$output = explode("\n", $output());
|
||||
array_pop($output);
|
||||
array_pop($output);
|
||||
|
||||
expect(implode("\n", $output))->toContain(file_get_contents($snapshot));
|
||||
}
|
||||
})->skip(!getenv('REBUILD_SNAPSHOTS') && getenv('EXCLUDE'))
|
||||
})->skip(! getenv('REBUILD_SNAPSHOTS') && getenv('EXCLUDE'))
|
||||
->skip(PHP_OS_FAMILY === 'Windows');
|
||||
|
||||
Reference in New Issue
Block a user