Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Laravel Testing For Beginners: PHPUnit, Pest, TDD
Intro
What's Inside This Course (2:16)
WHY you need to (automatically) test your code? (3:00)
Default Tests: How They Work and How to Launch Them (4:50)
Practical Project: Testing of CRUD
Our First Test: Products Table - Empty or Not? (4:58)
Database Configuration: RefreshDatabase, Phpunit.xml and .env.testing (5:05)
AAA "Mantra": Arrange, Act, Assert (1:56)
Be careful with assertSee: test DATA to avoid false positives (3:47)
Unit Tests vs Feature Tests: example of currency converter (5:40)
Factories: How to create many testing records without loops (4:54)
Auth Test: Does user have access to the page? (6:56)
Avoid creating the same data: Private methods or setUp() (3:17)
Testing roles: only Admin can access creating products (7:48)
New Product: testing that record was saved into database (4:59)
Edit Product: Testing correct values in form inputs (4:14)
Update Product: test if validation error is fired correctly (3:20)
Delete Product: test if it's actually removed from database (2:40)
Testing APIs and JSONs (5:42)
Php artisan test Flags: Run Specific Test(s) (1:43)
So, What Should We Test?
Test Coverage "Myth" and What is The Goal Instead? (7:07)
Should we test packages? Or Laravel models? (4:00)
Test happy path and sad path(s) (2:04)
PEST Example
What is PEST? How It Works: Simple Example (5:25)
More PEST Features: Uses, Helpers, Expectations (8:14)
TDD Example
What is TDD? How it works: Simple Example (9:07)
More Practice: Two More Tests with TDD (7:46)
General Thoughts on TDD (3:03)
What's Next?
You're Ready for Testing, but What's Next? (2:19)
Update Product: test if validation error is fired correctly
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock