{"id":87000,"library":"spatie-phpunit-snapshot-assertions","title":"Spatie PHPUnit Snapshot Assertions","description":"Snapshot testing for PHPUnit to compare output against stored snapshots.","status":"active","version":"5.4.0","language":"php","source_language":null,"source_url":"https://github.com/spatie/phpunit-snapshot-assertions","tags":["testing","snapshot","phpunit","assertions"],"install":[{"cmd":"composer require spatie/phpunit-snapshot-assertions","lang":"bash","label":"composer require"}],"dependencies":[],"imports":[{"symbol":"MatchesSnapshots","correct":"use Spatie\\Snapshots\\MatchesSnapshots;"}],"quickstart":{"code":"use Spatie\\Snapshots\\MatchesSnapshots;\n\nclass ExampleTest extends \\PHPUnit\\Framework\\TestCase\n{\n    use MatchesSnapshots;\n\n    public function testSomething()\n    {\n        $this->assertMatchesSnapshot('expected output');\n    }\n}","lang":"php","description":"Use the trait to assert a value matches a stored snapshot."},"warnings":[{"fix":"Run tests with --update-snapshots flag to update all snapshots.","message":"Snapshots are stored as files; ensure they are committed to version control and updated when output changes intentionally.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'assert':4,18 'compar':10 'output':11 'phpunit':2,8,17 'snapshot':3,5,14,16 'spati':1 'store':13 'test':6,15","created_at":"2026-06-19T08:11:49.922294+00:00","updated_at":"2026-06-19T08:11:49.922294+00:00","problems":[],"ecosystem":"packagist","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/spatie/phpunit-snapshot-assertions","github":"https://github.com/spatie/phpunit-snapshot-assertions","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-19","next_check":"2026-12-16","install_tag":null}}