Before finishing this section, I want to mention other available assertions. But I don't want to list all of them, so I will provide a set of useful links.
Also, because Laravel uses PHPUnit for testing, you can check the assertions in the PHPUnit docs.
If you use the Pest framework, you can still use the same assertions from PHPUnit. Because under the hood Pest requires PHPUnit.
But, for Pest, you mainly will use expectations, which Pest have quite a lot.
Finally, if you don't find a method that tests what you need, as a final resort, you may use assertTrue()
or expect($value)->toBeTrue()
with any condition.
For example, if you search for toBeTrue()
on the laravelio/laravel.io, you will find multiple expectation like that.