Small note: chaining assertion also available in "regular" laravel tests.
@MarienMupenda2 жыл бұрын
Thank you for the video, I will finally start writing tests after this series.
@Denakino2 жыл бұрын
You can even save 2 more characters per test by using it() instead of test().
Жыл бұрын
You're the best
@code75581 Жыл бұрын
Thanks for the video. Please where the $this comes from as there is no class in the file created with --pest flag
@_KimAngell10 ай бұрын
It comes from Illuminate\Foundation\Testing\TestCase, which is extended as an abstract class in ~/tests/TestCase.php
@coolcha2 жыл бұрын
Dont know why, but I still prefer phpunit.
@LaravelDaily2 жыл бұрын
Me too.
@coolcha2 жыл бұрын
@@LaravelDaily I suppose I feel there is too much "magic" happening, like in the config. If I open the test I feel I will not know what all is being loaded in the background by just looking at the test class.
@maxshaian72602 жыл бұрын
My reasons why. 1) Procedural code against OOP. İt makes testing less flexible. I cannot use standard Oop features and have to call different methods to achieve the same. Also no hinting this way. İn particular, laravel standard helpers. 2) Maybe I haven't figured out out, but it's console outputs miss styling, which is hard to read and debug. 3) Tests written with it look less readable for me. I have to check what I call, why and what preparation is made and where. İt's ok for a little number of tests, but for more it is harder. 4) I don't see any advantages before phpunit. Please, guide me if you know. Features like call the same test several times with different inputs looks like a fancier implementation of foreach