Overview
Learn how to replace objects in PHP tests with test-doubles using fakes, stubs, and mocks. This course aims to teach you the essential skill of testing code more efficiently and with a tighter focus. The course covers topics such as 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, and The Mock Builder. The teaching method includes practical demonstrations and examples. This course is intended for PHP developers looking to enhance their testing skills.
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