One EASY Pest Test for All Laravel Routes

preview_player
Показать описание
A tip by Nuno Maduro, which I decided to expand with even more automation.

Links mentioned in the video:

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

How about if the page URL contains an id? Can we use this way or not?

alitindrawan
Автор

I like this approach. I wonder if there is a way to do this without the package, I like to keep my dependencies minimal.
One thing I do that wasn't mentioned in the video is split these into two separate tests, one for authenticated routes and one for public routes.

bradsi
Автор

I was started a testing generating package with the same idea a while ago maybe 2 years ago but i didn't finish it the idea was to go through route:list and all get router will have a test with assertOk i was gonna add something to check form requests and create a post/patch tests to but you know devs never had time haha

Hobrt
Автор

What kind of magic provides the values for the Parameters in the urls?

minibar
Автор

Unfortunately it doesn't work with Pest v.2

TYPOlight
Автор

Cab u please make a new video and make this functionality without pest, and what if i have id in my route ?!

mostafamasri
Автор

This actually works only for pestphp/pest-plugin ^1.0 because pest-plugin-larastrap dependency

gluktd
Автор

You forgot one caveat that not all pages are public for all users.

bumblebity