{"id":18578284,"url":"https://github.com/astrotomic/pest-plugin-laravel-snapshots","last_synced_at":"2025-04-10T10:31:00.582Z","repository":{"id":52291881,"uuid":"274524196","full_name":"Astrotomic/pest-plugin-laravel-snapshots","owner":"Astrotomic","description":"This package adds snapshot testing capabilities to Laravel HTTP tests with Pest.","archived":false,"fork":false,"pushed_at":"2021-05-31T12:13:30.000Z","size":43,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T02:22:33.312Z","etag":null,"topics":["hacktoberfest","http","laravel","pest","snapshot","snapshot-testing","test","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Astrotomic.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-23T22:48:34.000Z","updated_at":"2021-05-31T12:13:33.000Z","dependencies_parsed_at":"2022-09-05T22:13:16.989Z","dependency_job_id":null,"html_url":"https://github.com/Astrotomic/pest-plugin-laravel-snapshots","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fpest-plugin-laravel-snapshots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fpest-plugin-laravel-snapshots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fpest-plugin-laravel-snapshots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrotomic%2Fpest-plugin-laravel-snapshots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrotomic","download_url":"https://codeload.github.com/Astrotomic/pest-plugin-laravel-snapshots/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","http","laravel","pest","snapshot","snapshot-testing","test","testing"],"created_at":"2024-11-06T23:34:30.909Z","updated_at":"2025-04-10T10:31:00.557Z","avatar_url":"https://github.com/Astrotomic.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pest Laravel Snapshot Assertions\n\n[![Latest Version](http://img.shields.io/packagist/v/astrotomic/pest-plugin-laravel-snapshots.svg?label=Release\u0026style=for-the-badge)](https://packagist.org/packages/astrotomic/pest-plugin-laravel-snapshots)\n[![MIT License](https://img.shields.io/github/license/Astrotomic/pest-plugin-laravel-snapshots.svg?label=License\u0026color=blue\u0026style=for-the-badge)](https://github.com/Astrotomic/pest-plugin-laravel-snapshots/blob/master/LICENSE)\n[![Offset Earth](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-green?style=for-the-badge)](https://plant.treeware.earth/Astrotomic/pest-plugin-laravel-snapshots)\n[![Larabelles](https://img.shields.io/badge/Larabelles-%F0%9F%A6%84-lightpink?style=for-the-badge)](https://www.larabelles.com/)\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Astrotomic/pest-plugin-laravel-snapshots/run-tests?style=flat-square\u0026logoColor=white\u0026logo=github\u0026label=Tests)](https://github.com/Astrotomic/pest-plugin-laravel-snapshots/actions?query=workflow%3Arun-tests)\n[![StyleCI](https://styleci.io/repos/274524196/shield)](https://styleci.io/repos/274524196)\n[![Total Downloads](https://img.shields.io/packagist/dt/astrotomic/pest-plugin-laravel-snapshots.svg?label=Downloads\u0026style=flat-square)](https://packagist.org/packages/astrotomic/pest-plugin-laravel-snapshots)\n\nThis package adds snapshot testing capabilities to Laravel HTTP tests with **[Pest](https://pestphp.com)**.\nIt uses the [phpunit-snapshot-assertions](https://github.com/spatie/phpunit-snapshot-assertions) package making\nsnapshot assertions available in Pest HTTP tests.\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require astrotomic/pest-plugin-laravel-snapshots --dev\n```\n\n## Usage\n\nAt first you should use [orchestra/testbench](https://github.com/orchestral/testbench) which adds the HTTP helper methods that return a `\\Illuminate\\Testing\\TestResponse` instance.\n\n```php\nuse Orchestra\\Testbench\\TestCase;\nuses(TestCase::class);\n\n// long\ntest('html response body matches with snapshot')\n    -\u003eget('/html')\n    -\u003eassertMatchesHtmlSnapshot();\n\n// short\n// https://github.com/pestphp/pest-plugin-laravel\nuse function Pest\\Laravel\\get;\nget('/html')-\u003eassertMatchesHtmlSnapshot();\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](https://github.com/Astrotomic/.github/blob/master/CONTRIBUTING.md) for details. You could also be interested in [CODE OF CONDUCT](https://github.com/Astrotomic/.github/blob/master/CODE_OF_CONDUCT.md).\n\n### Security\n\nIf you discover any security related issues, please check [SECURITY](https://github.com/Astrotomic/.github/blob/master/SECURITY.md) for steps to report it.\n\n## Credits\n\n-   [Tom Witkowski](https://github.com/Gummibeer)\n-   [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n\n## Treeware\n\nYou're free to use this package, but if it makes it to your production environment I would highly appreciate you buying the world a tree.\n\nIt’s now common knowledge that one of the best tools to tackle the climate crisis and keep our temperatures from rising above 1.5C is to [plant trees](https://www.bbc.co.uk/news/science-environment-48870920). If you contribute to my forest you’ll be creating employment for local families and restoring wildlife habitats.\n\nYou can buy trees at [offset.earth/treeware](https://plant.treeware.earth/Astrotomic/pest-plugin-laravel-snapshots)\n\nRead more about Treeware at [treeware.earth](https://treeware.earth)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fpest-plugin-laravel-snapshots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrotomic%2Fpest-plugin-laravel-snapshots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrotomic%2Fpest-plugin-laravel-snapshots/lists"}