mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 05:14:04 +00:00
Week 11/2022
This commit is contained in:
parent
4af817e2b0
commit
b451d14953
12 changed files with 135 additions and 1 deletions
11
content/tips/you-can-use-this-gtmock-in-pest-tests.md
Normal file
11
content/tips/you-can-use-this-gtmock-in-pest-tests.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: 'You can use $this->mock in Pest tests'
|
||||
tweet_id: '1505269906157187072'
|
||||
thread_slug: weekly-thread-2022-11
|
||||
author_username: enunomaduro
|
||||
images:
|
||||
- 'https://pbs.twimg.com/media/FN-0CQaWUAYsMxv.jpg'
|
||||
created_at: 2022-03-19T19:48:06+00:00
|
||||
slug: you-can-use-this-gtmock-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. ✅
|
||||
Loading…
Add table
Add a link
Reference in a new issue