From 9426d08aa2a025558d4817b1bd61be366b24b822 Mon Sep 17 00:00:00 2001 From: jordanbrauer <18744334+jordanbrauer@users.noreply.github.com> Date: Sat, 13 Feb 2021 12:12:32 -0600 Subject: [PATCH] update snapshot for running tests with failed classnames --- tests/.snapshots/success.txt | 23 ++++++++++++++++++++++- tests/Visual/Success.php | 8 +++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/tests/.snapshots/success.txt b/tests/.snapshots/success.txt index 36136f81..cfe2a393 100644 --- a/tests/.snapshots/success.txt +++ b/tests/.snapshots/success.txt @@ -103,6 +103,27 @@ PASS Tests\Fixtures\ExampleTest ✓ it example 2 + PASS Tests\PHPUnit\CustomAffixes\InvalidTestName + ✓ this runs file names like "@#$%^&()-_=+.php" + + PASS Tests\PHPUnit\CustomAffixes\ATestWithSpaces + ✓ this runs file names like "A Test With Spaces.php" + + PASS Tests\PHPUnit\CustomAffixes\AdditionalFileExtensionspec + ✓ this runs file names like "AdditionalFileExtension.spec.php" + + PASS Tests\PHPUnit\CustomAffixes\ManyExtensionsclasstest + ✓ this runs file names like "ManyExtensions.class.test.php" + + PASS Tests\PHPUnit\CustomAffixes\TestCaseWithQuotes + ✓ this runs file names like "Test 'Case' With Quotes.php" + + PASS Tests\PHPUnit\CustomAffixes\kebabcasespec + ✓ this runs file names like "kebab-case-spec.php" + + PASS Tests\PHPUnit\CustomAffixes\snakecasespec + ✓ this runs file names like "snake_case_spec.php" + PASS Tests\PHPUnit\CustomTestCase\UsesPerDirectory ✓ closure was bound to CustomTestCase @@ -188,5 +209,5 @@ ✓ it is a test ✓ it uses correct parent class - Tests: 7 skipped, 108 passed + Tests: 7 skipped, 115 passed \ No newline at end of file diff --git a/tests/Visual/Success.php b/tests/Visual/Success.php index 1323da5b..44aac2bc 100644 --- a/tests/Visual/Success.php +++ b/tests/Visual/Success.php @@ -13,7 +13,13 @@ test('visual snapshot of test suite on success', function () { $process->run(); - return preg_replace('#\\x1b[[][^A-Za-z]*[A-Za-z]#', '', $process->getOutput()); + return preg_replace([ + '#\\x1b[[][^A-Za-z]*[A-Za-z]#', + '/(Tests\\\PHPUnit\\\CustomAffixes\\\InvalidTestName)([A-Za-z0-9]*)/' + ], [ + '', + '$1' + ], $process->getOutput()); }; if (getenv('REBUILD_SNAPSHOTS')) {