Laravel: PHPUnit Testing for Beginners
Salepage : Laravel: PHPUnit Testing for Beginners
Archive : Laravel: PHPUnit Testing for Beginners Digital Download
Delivery : Digital Download Immediately
Automated testing is a crucial part of any long-term IT project. But often developers don’t have time for that – budgets and deadlines are tight, and clients want to launch features quickly.
As a result, a lot of developers never start actually testing, because they don’t have projects with time/budget to afford this “luxury”. Also it seems that PHPUnit and “100% Test Coverage” are really complicated.
In reality, automated testing is pretty simple – and I will prove it to you in this course.
To start testing simple functionality, it’s enough to invest a few hours and you will adapt the mindset, with basic examples.
Throughout this course, we will create a mini-application for Products CRUD, and with every page I will show you different details of automated testing:
– Testing that some text is on the page
– Testing that some data is correctly added/updated/deleted
– Testing that correct validation was actually fired
– Testing that only authenticated users access the data
– etc.
Finally, in the last lesson I will show you a TDD approach to write tests, with test written before the actual application.
Comments from students:
Your Instructor
Povilas Korop
I consider myself a Laravel expert. Work with Laravel around 6 years, sharing my thoughts on YouTube channel “Laravel Business”:
https://www.youtube.com/channel/UCTuplgOBi6tJIlesI…
I also have written a Laravel Daily Blog for 5+ years.
Course Curriculum
List of Lessons (~90 Minutes Total)
Start
Intro: WHY do you need to (automatically) test your code? (2:11)
Preview
Our First Test: How PHPUnit works? What is Test and Assertion? (4:45)
Start
Real project “Product List”: Testing that table is (not) empty (5:45)
Start
Database Configuration: RefreshDatabase, Phpunit.xml and .env.testing (7:27)
Start
Be careful with assertSee: test DATA to avoid false positives (3:07)
Start
Unit Tests vs Feature Tests: example of currency converter (9:32)
Preview
Factories: How to create many testing records without loops (6:43)
Start
Auth Test: Does user have access to the page? (10:13)
Start
Avoid creating the same data: Private methods or setUp() (4:20)
Start
Testing roles: only Admin can access creating products (6:49)
Start
New Product: testing that record was saved into database (4:17)
Start
Edit Product: Testing correct values in form inputs (3:27)
Start
Update Product: test if validation error is fired correctly (4:47)
Start
Delete Product: test if it’s actually removed from database (3:00)
Start
Testing file uploads: fake storage driver (4:54)
Start
PHPUnit Flags: run only the tests you’re interested in (3:16)
Start
Test Driven Development: simple TDD example (7:28)
More from Categories : Everything Else
Reviews
There are no reviews yet.