{"id":15600717,"url":"https://github.com/svenluijten/laravel-view-assertions","last_synced_at":"2025-04-28T10:48:20.031Z","repository":{"id":43347186,"uuid":"358929420","full_name":"svenluijten/laravel-view-assertions","owner":"svenluijten","description":"🧑‍🔬 The missing assertions for your views in your Laravel applications.","archived":false,"fork":false,"pushed_at":"2024-03-26T15:45:01.000Z","size":43,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"1.x","last_synced_at":"2025-04-18T15:16:43.877Z","etag":null,"topics":["assertions","laravel","laravel-blade","laravel-package","phpunit"],"latest_commit_sha":null,"homepage":"https://svenluijten.com","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/svenluijten.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-17T16:33:22.000Z","updated_at":"2024-03-21T07:44:20.000Z","dependencies_parsed_at":"2024-03-26T16:48:17.210Z","dependency_job_id":"765b0504-5480-4fe6-a4e6-bea9ef3f0345","html_url":"https://github.com/svenluijten/laravel-view-assertions","commit_stats":{"total_commits":31,"total_committers":3,"mean_commits":"10.333333333333334","dds":0.3548387096774194,"last_synced_commit":"b9050f48f7aa140fd025411aa746db5c9687f5e0"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":"svenluijten/package-skeleton","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenluijten%2Flaravel-view-assertions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenluijten%2Flaravel-view-assertions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenluijten%2Flaravel-view-assertions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svenluijten%2Flaravel-view-assertions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svenluijten","download_url":"https://codeload.github.com/svenluijten/laravel-view-assertions/tar.gz/refs/heads/1.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251298705,"owners_count":21567061,"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":["assertions","laravel","laravel-blade","laravel-package","phpunit"],"created_at":"2024-10-03T02:05:41.970Z","updated_at":"2025-04-28T10:48:19.985Z","avatar_url":"https://github.com/svenluijten.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Laravel View Assertions](https://user-images.githubusercontent.com/11269635/115122193-f2b8e580-9fb6-11eb-9604-eb8ba59cc445.jpg)\n\n# Laravel View Assertions\n\n[![Latest Version on Packagist][ico-version]][link-packagist]\n[![Total Downloads][ico-downloads]][link-downloads]\n[![Software License][ico-license]](LICENSE.md)\n[![Build Status][ico-build]][link-build]\n[![StyleCI][ico-styleci]][link-styleci]\n\nThe missing assertions for your views in your Laravel applications.\n\n## Installation\nYou'll have to follow a couple of simple steps to install this package.\n\n### Downloading\nVia [composer](http://getcomposer.org):\n\n```bash\n$ composer require sven/laravel-view-assertions --dev\n```\n\nOr add the package to your dependencies in `composer.json` and run\n`composer update` on the command line to download the package:\n\n```json\n{\n    \"require-dev\": {\n        \"sven/laravel-view-assertions\": \"^1.1\"\n    }\n}\n```\n\n## Usage\nThis package exposes a single trait: `\\Sven\\LaravelViewAssertions\\InteractsWithViews`.\nWhen you `use` this trait in your tests as below, you'll get access to several assertions:\n\n```php\n\u003c?php\n\nuse Sven\\LaravelViewAssertions\\InteractsWithViews;\nuse Illuminate\\Foundation\\Testing\\TestCase;\n\nclass ExampleTest extends TestCase\n{\n    use InteractsWithViews;\n\n    public function test_it_creates_a_view()\n    {\n        // ...\n        \n        $this-\u003eassertViewExists('some.view-file');\n        $this-\u003eassertViewsExist(['posts.index', 'posts.show']);\n    }\n\n    public function test_it_does_not_create_a_view()\n    {\n        // ...\n        \n        $this-\u003eassertViewDoesNotExist('some.view-file');\n        $this-\u003eassertViewsDoNotExist(['posts.edit', 'posts.create']);\n    }\n\n    public function test_the_view_equals()\n    {\n        // ...\n        \n        $this-\u003eassertViewEquals('The Expected Contents', 'index');\n    }\n\n    public function test_the_view_does_not_equal()\n    {\n        // ...\n        \n        $this-\u003eassertViewDoesNotEqual('This Is Not The Content You\\'re Looking For', 'index');\n    }\n}\n```\n\n## Contributing\nAll contributions (pull requests, issues and feature requests) are\nwelcome. Make sure to read through the [CONTRIBUTING.md](CONTRIBUTING.md) first,\nthough. See the [contributors page](../../graphs/contributors) for all contributors.\n\n## License\n`sven/laravel-view-assertions` is licensed under the MIT License (MIT). Please see the\n[license file](LICENSE.md) for more information.\n\n[ico-version]: https://img.shields.io/packagist/v/sven/laravel-view-assertions.svg?style=flat-square\n[ico-license]: https://img.shields.io/badge/license-MIT-green.svg?style=flat-square\n[ico-downloads]: https://img.shields.io/packagist/dt/sven/laravel-view-assertions.svg?style=flat-square\n[ico-build]: https://img.shields.io/github/actions/workflow/status/svenluijten/laravel-view-assertions/run-tests.yml?style=flat-square\n[ico-styleci]: https://styleci.io/repos/358929420/shield\n\n[link-packagist]: https://packagist.org/packages/sven/laravel-view-assertions\n[link-downloads]: https://packagist.org/packages/sven/laravel-view-assertions\n[link-build]: https://github.com/svenluijten/laravel-view-assertions/actions/workflows/run-tests.yml\n[link-styleci]: https://styleci.io/repos/358929420\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenluijten%2Flaravel-view-assertions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvenluijten%2Flaravel-view-assertions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvenluijten%2Flaravel-view-assertions/lists"}