Test to check if the full test path is shown

This commit is contained in:
Dimitrios Karvounaris
2020-06-05 17:38:59 +02:00
parent d35320c697
commit 6e18912ea6

View File

@ -10,6 +10,11 @@ $run = function (string $target) {
return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput()); 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) { test('allows to run a single test', function () use ($run) {
$output = $run('tests/Fixtures/DirectoryWithTests/ExampleTest.php'); $output = $run('tests/Fixtures/DirectoryWithTests/ExampleTest.php');
assertStringContainsString(' PASS Tests\Fixtures\DirectoryWithTests\ExampleTest', $output); assertStringContainsString(' PASS Tests\Fixtures\DirectoryWithTests\ExampleTest', $output);