Build the Finance Skills That Lead to Promotions, Not Just Certificates
Power BI Fundamentals - Create visualizations and dashboards from scratch
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This course teaches practical PHPUnit test-double techniques for isolating PHP code during testing. It covers setup, mock expectations, return values, exceptions, callbacks, argument verification, and custom mocks.
Syllabus
Introduction to test doubles
Install PHPUnit and setup autoloading
Create a test file
Create a mock object
Set mock expectations
Faking method-returned values
Default mock method return values
Mocking consecutive method returns
Mock throwing exceptions
Complex mock returns using callbacks
Test correct method args passed to mocked method
Passing multiple args to mocked method
Complex mock method args using callbacks
Custom mocks using the Mock Builder
Taught by
Gary Clarke