AI, Data Science & Cloud Certificates from Google, IBM & Meta
Master Production-Ready Machine Learning, Step by Step
Overview
Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This course demonstrates how to replace objects in PHP tests with PHPUnit stubs and mocks. It covers return values, exceptions, callbacks, call expectations, and argument checks.
Syllabus
PHPUnit Test Doubles
Testing Expectations
Faking Method Return Values
Testing Consecutive Returns
Throwing Exceptions From Stubbed Methods
Will Return Callback
Test Faked Methods Receive Correct Args
Test Correct Args With Callbacks
The Mock Builder
Taught by
Gary Clarke