tests: removes test coverage for now

Co-Authored-By: Johannes Pichler <fetzi@users.noreply.github.com>
This commit is contained in:
Nuno Maduro
2020-06-14 16:35:30 +02:00
parent 06d707fb41
commit f9a3e39902
2 changed files with 2 additions and 35 deletions

View File

@ -134,9 +134,6 @@
PASS Tests\Unit\TestSuite
✓ it does not allow to add the same test description twice
PASS Tests\Visual\Coverage
✓ coverage
PASS Tests\Visual\SingleTestOrDirectory
✓ allows to run a single test
✓ allows to run a directory
@ -146,5 +143,5 @@
WARN Tests\Visual\Success
s visual snapshot of test suite on success
Tests: 6 skipped, 79 passed
Time: 3.91s
Tests: 6 skipped, 78 passed
Time: 3.09s

View File

@ -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');