mirror of
https://github.com/archtechx/laravel-tips.git
synced 2025-12-12 13:24:03 +00:00
Add Pest related tips
This commit is contained in:
parent
8e123a49f4
commit
8ba479c6e4
5 changed files with 48 additions and 0 deletions
11
content/tips/create-a-using-helper.md
Normal file
11
content/tips/create-a-using-helper.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: 'Create a using() helper'
|
||||
tweet_id: 1426219050250772482
|
||||
thread_slug: pest-tips
|
||||
author_username: archtechx
|
||||
images:
|
||||
- https://pbs.twimg.com/media/E8ryqTuWEAQT-1H.jpg
|
||||
created_at: 2021-08-16T19:09:24+02:00
|
||||
slug: create-a-using-helper
|
||||
---
|
||||
Create a using() helper to get perfect IDE support on $this calls inside your tests.
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: 'Create helper functions for creating models in tests using factories'
|
||||
tweet_id: 1425833852480626694
|
||||
thread_slug: pest-tips
|
||||
author_username: archtechx
|
||||
images:
|
||||
- https://pbs.twimg.com/media/E8mO3a5VEAAsjr1.jpg
|
||||
|
||||
created_at: 2021-08-16T19:09:22+02:00
|
||||
slug: create-helper-functions-for-creating-models-in-tests-using-factories
|
||||
---
|
||||
For example:
|
||||
- invoice() to create an Invoice model
|
||||
- product() to create a Product model
|
||||
11
content/tips/use-please-instead-of-using-using.md
Normal file
11
content/tips/use-please-instead-of-using-using.md
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: 'Use please() instead of using using()'
|
||||
tweet_id: 1426235640509865986
|
||||
thread_slug: pest-tips
|
||||
author_username: archtechx
|
||||
images:
|
||||
- https://pbs.twimg.com/media/E8sBPPaXoAYJ9s6.png
|
||||
created_at: 2021-08-16T19:09:26+02:00
|
||||
slug: use-please-instead-of-using-using
|
||||
---
|
||||
Even nicer than using().
|
||||
Loading…
Add table
Add a link
Reference in a new issue