spatie / phpunit-snapshot-assertions

A way to test without writing actual test cases
https://spatie.be/courses/testing-laravel-with-pest/snapshot-testing
MIT License
641 stars 70 forks source link

clean filenames on MatchesFileSnapshot #130

Closed Khartir closed 3 years ago

Khartir commented 3 years ago

Windows has a problem with filenames containing " as they are created by tests with a dataprovider. There is already a function in the Snapshot class that cleans these filenames, however the assertMatchesFileSnapshot method does not use it. This PR extracts the filename cleaning from the Snapshot class and also uses it in assertMatchesFileSnapshot.

freekmurze commented 3 years ago

Thanks!