{"repo":"spatie/pest-plugin-route-testing","free":true,"listed":false,"github":"https://github.com/spatie/pest-plugin-route-testing","clone":"git clone https://github.com/spatie/pest-plugin-route-testing.git","description":"Make sure all routes in your Laravel app are ok","language":"PHP","stars":140,"topics":["laravel","pest","php","routes","testing"],"license":"MIT","category":"dev-tools","readme_excerpt":"Make sure all routes in your Laravel app are ok In a typical Laravel application there are many pages that can be accessed by users. It's easy to forget to test all of them. This package makes it easy to test all GET routes in your application. Here's a quick example: This will test all GET routes in your application and ensure they return a 200 HTTP status code. Here's what the output looks like when you run this test in a small app. Instead of assertSuccessful() you can use any assertion that is available in Laravel's TestResponse class, such as assertRedirect() , assertNotFound() , assertForbidden() , etc. You can also test specific routes: If you there are routes that have route model bindings, the package will skip the test for those routes. Let's assume you have a route defined as user/{user} . Here's what the output looks like when you run the test. If you want to test a route with a route model binding, you can provide the model using the bind method. When you run the test now, the package will use the provided model to test the route. Support us We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products. We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall. Installation You can install the package via composer: Usage You can ","default_branch":null,"files":null,"tree":[],"storefront":"/r/spatie","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/spatie/pest-plugin-route-testing/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}