Completed
Mock throwing exceptions
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
PHPUnit Test Doubles - Mocks and Stubs Tutorial
Automatically move to the next video in the Classroom when playback concludes
- 1 Introduction to test doubles
- 2 Install PHPUnit and setup autoloading
- 3 Create a test file
- 4 Create a mock object
- 5 Set mock expectations
- 6 Faking method-returned values
- 7 Default mock method return values
- 8 Mocking consecutive method returns
- 9 Mock throwing exceptions
- 10 Complex mock returns using callbacks
- 11 Test correct method args passed to mocked method
- 12 Passing multiple args to mocked method
- 13 Complex mock method args using callbacks
- 14 Custom mocks using the Mock Builder