mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 07:47:22 +01:00
tests: removes test coverage for now
Co-Authored-By: Johannes Pichler <fetzi@users.noreply.github.com>
This commit is contained in:
@ -134,9 +134,6 @@
|
|||||||
PASS Tests\Unit\TestSuite
|
PASS Tests\Unit\TestSuite
|
||||||
✓ it does not allow to add the same test description twice
|
✓ it does not allow to add the same test description twice
|
||||||
|
|
||||||
PASS Tests\Visual\Coverage
|
|
||||||
✓ coverage
|
|
||||||
|
|
||||||
PASS Tests\Visual\SingleTestOrDirectory
|
PASS Tests\Visual\SingleTestOrDirectory
|
||||||
✓ allows to run a single test
|
✓ allows to run a single test
|
||||||
✓ allows to run a directory
|
✓ allows to run a directory
|
||||||
@ -146,5 +143,5 @@
|
|||||||
WARN Tests\Visual\Success
|
WARN Tests\Visual\Success
|
||||||
s visual snapshot of test suite on success
|
s visual snapshot of test suite on success
|
||||||
|
|
||||||
Tests: 6 skipped, 79 passed
|
Tests: 6 skipped, 78 passed
|
||||||
Time: 3.91s
|
Time: 3.09s
|
||||||
|
|||||||
@ -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