mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
tests: removes test coverage for now
Co-Authored-By: Johannes Pichler <fetzi@users.noreply.github.com>
This commit is contained in:
@ -1,30 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Symfony\Component\Process\Process;
|
||||
|
||||
$run = function (string $target) {
|
||||
$process = new Process(['php', 'bin/pest', $target, '--coverage'], dirname(__DIR__, 2));
|
||||
|
||||
$process->run();
|
||||
|
||||
return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput());
|
||||
};
|
||||
|
||||
$snapshot = function ($name) {
|
||||
$testsPath = dirname(__DIR__);
|
||||
|
||||
return file_get_contents(implode(DIRECTORY_SEPARATOR, [
|
||||
$testsPath,
|
||||
'.snapshots',
|
||||
"$name.txt",
|
||||
]));
|
||||
};
|
||||
|
||||
test('coverage', function () use ($run, $snapshot) {
|
||||
$text = $run('tests/Playground.php');
|
||||
|
||||
assertStringContainsString(
|
||||
$snapshot('coverage'),
|
||||
$run('tests/Playground.php')
|
||||
);
|
||||
})->skip(PHP_OS_FAMILY === 'Windows');
|
||||
Reference in New Issue
Block a user