You can use $this->mock in Pest tests

You can use $this->mock in Pest tests

Within your Pest / PHPUnit tests, you may use @laravelphp's "mock" method to instruct the container to use your mocked instance of the object instead of constructing the object itself. ✅

We're writing a book, you can get it for free here.