
Episode 78
Lots of different ways to test record creation
No Compromises · Joel Clermont and Aaron Saray
July 11, 202310m 15s
Audio is streamed directly from the publisher (media.transistor.fm) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.
Show Notes
We get a bit nerdy here and dive deep on a few different ways to test record creation.
- (00:00) - We like testing
- (01:20) - One way to test creating a record
- (03:00) - Limitations of fetch the record with first()
- (05:30) - Considerations when using latest() in tests
- (07:00) - An approach for using auto-increment IDs
- (08:05) - Silly bit
Read more of our thoughts at masteringlaravel.io
Topics
Laraveltesting