This course was created with the
course builder. Create your online course today.
Start now
Create your course
with
Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Laravel: PHPUnit Testing for Beginners
List of Lessons (~90 Minutes Total)
Intro: WHY do you need to (automatically) test your code? (2:11)
Our First Test: How PHPUnit works? What is Test and Assertion? (4:45)
Real project "Product List": Testing that table is (not) empty (5:45)
Database Configuration: RefreshDatabase, Phpunit.xml and .env.testing (7:27)
Be careful with assertSee: test DATA to avoid false positives (3:07)
Unit Tests vs Feature Tests: example of currency converter (9:32)
Factories: How to create many testing records without loops (6:43)
Auth Test: Does user have access to the page? (10:13)
Avoid creating the same data: Private methods or setUp() (4:20)
Testing roles: only Admin can access creating products (6:49)
New Product: testing that record was saved into database (4:17)
Edit Product: Testing correct values in form inputs (3:27)
Update Product: test if validation error is fired correctly (4:47)
Delete Product: test if it's actually removed from database (3:00)
Testing file uploads: fake storage driver (4:54)
PHPUnit Flags: run only the tests you're interested in (3:16)
Test Driven Development: simple TDD example (7:28)
Avoid creating the same data: Private methods or setUp()
Lesson content locked
If you're already enrolled,
you'll need to login
.
Enroll in Course to Unlock