diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index eb00d006..1231d8a8 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -126,7 +126,6 @@ ✓ it does not allow to add the same test description twice PASS Tests\Visual\SingleTestOrDirectory - ✓ output contains full test path ✓ allows to run a single test ✓ allows to run a directory ✓ it has ascii chars (decorated printer) @@ -135,5 +134,5 @@ WARN Tests\Visual\Success s visual snapshot of test suite on success - Tests: 6 skipped, 72 passed + Tests: 6 skipped, 71 passed Time: 2.89s diff --git a/tests/Visual/SingleTestOrDirectory.php b/tests/Visual/SingleTestOrDirectory.php index 6298f98e..8f287ddd 100644 --- a/tests/Visual/SingleTestOrDirectory.php +++ b/tests/Visual/SingleTestOrDirectory.php @@ -10,25 +10,25 @@ $run = function (string $target) { return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput()); }; -test('output contains full test path', function() use ($run) { - $output = $run('tests/Fixtures/DirectoryWithTests/ExampleTest.php'); - assertStringContainsString(' PASS Tests\Fixtures\DirectoryWithTests\ExampleTest', $output); -}); - test('allows to run a single test', function () use ($run) { - $output = $run('tests/Fixtures/DirectoryWithTests/ExampleTest.php'); - assertStringContainsString(' PASS Tests\Fixtures\DirectoryWithTests\ExampleTest', $output); - assertStringContainsString(' ✓ it example 1', $output); - assertStringContainsString(' Tests: 1 passed', $output); + assertStringContainsString(<<run(); $output = $process->getOutput(); - assertStringContainsString(" \e[30;42;1m PASS \e[39;49;22m\e[39m Tests\Fixtures\DirectoryWithTests\ExampleTest\e[39m", $output); - assertStringContainsString(" \e[32;1m✓\e[39;22m\e[39m \e[2mit example 1\e[22m\e[39m", $output); - assertStringContainsString(" \e[37;1mTests: \e[39;22m\e[32;1m1 passed\e[39;22m", $output); + assertStringContainsString(<<run(); $output = $process->getOutput(); - assertStringContainsString(' PASS Tests\Fixtures\DirectoryWithTests\ExampleTest', $output); - assertStringContainsString(" ✓ \e[2mit example 1\e[22m", $output); - assertStringContainsString(' Tests: 1 passed', $output); + assertStringContainsString(<<