update snapshot for running tests with failed classnames

This commit is contained in:
jordanbrauer
2021-02-13 12:12:32 -06:00
parent fe2fac37f8
commit 9426d08aa2
2 changed files with 29 additions and 2 deletions

View File

@ -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

View File

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