spatie/phpunit-snapshot-assertions
Add snapshot testing to PHPUnit with simple assertions for JSON, XML, and text. First run creates snapshots; later runs compare outputs and fail on regressions. Ideal for verifying serialized data and responses with minimal test boilerplate.
getSnapshotId() from named snapshots feature — restored original no-parameter signatureFull Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.2.3...5.3.0
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.2.2...5.2.3
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.2.1...5.2.2
assertMatchesJsonSnapshot to accept any JSON-serializable value by @LuckyWindsck in https://github.com/spatie/phpunit-snapshot-assertions/pull/216Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.2.0...5.2.1
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.8...5.2.0
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.7...5.1.8
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.6...5.1.7
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.5...5.1.6
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.16...4.2.17
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.4...5.1.5
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.3...5.1.4
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.2...5.1.3
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.1.1...5.1.2
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.0.2...5.1.0
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/5.0.0...5.0.1
run-tests status in README.md by @gomzyakov in https://github.com/spatie/phpunit-snapshot-assertions/pull/160Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.16...5.0.0
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.15...4.2.16
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.14...4.2.15
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.13...4.2.14
Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.12...4.2.13
LIBXML_HTML_NODEFDTD to maintain output consistency by @JayBizzle in https://github.com/spatie/phpunit-snapshot-assertions/pull/141Full Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.11...4.2.12
--without-creating-snapshots flagSnapshots generated with assertMatchesSnapshot will break when upgrading to this version. The easiest way to upgrade is to ensure your snapshot tests pass, delete your snapshots, upgrade the package, then rerun the tests to generate new snapshots.
assertMatchesSnapshot: scalars (strings, integers & floats) are serialized to txt files, objects & arrays are serialized to yaml filesTextDriver to store snapshots in txt filesObjectDriver to serialize data to YAML and store snapshots in yaml filesVarDriverassertMatchesJsonSnapshot now supports all JSON serializable objects, and won't convert empty arrays to obejcts anymoreassertMatchesHtmlSnapshot assertionassertMatchesFileSnapshotassertMatchesFileHashSnapshotassertMatchesFileHashSnapshot assertionexample folder to .gitattributesFull Changelog: https://github.com/spatie/phpunit-snapshot-assertions/compare/4.2.7...4.2.8
How can I help you explore Laravel packages today?