Section 1 : Introduction and project setup

Lecture 2 Install PHP and Composer (Windows)
Lecture 3 Install PHP and Composer (macOS) 1:40
Lecture 4 Install PHP and Composer (Linux) 1:31
Lecture 5 Create a project folder and install PHPUnit 1:58

Section 2 : Unit testing with PHPUnit the basics

Lecture 6 Write and run your first test an introduction to assertions 4:16
Lecture 7 Test a function using multiple assertions 3:0
Lecture 8 Test that incorrect results are not returned using multiple test methods 2:45
Lecture 9 Test a class fixing bugs through testing 4:30
Lecture 10 How to name your test methods 3:5

Section 3 : Configuring the PHPUnit test environment

Lecture 11 The PHPUnit test runner specify different options when running tests 3:3
Lecture 12 Configure PHPUnit the XML configuration file 4:5
Lecture 13 Autoload classes being tested using Composer 3:58

Section 4 : Test dependencies, fixtures and exceptions

Lecture 14 Unit test a queue class 4:16
Lecture 15 Test dependencies make one test method dependent on another 3:3
Lecture 16 Fixtures set up the known state of the tests using setUp and tearDown 4:38
Lecture 17 Easily add a new test method using the test fixture 2:7
Lecture 18 Share fixtures between tests for resource-intensive data 4:8
Lecture 19 Testing exceptions expecting code to throw an exception 4:10

Section 5 : Test doubles mocks and stubs

Lecture 20 Test doubles create mock objects to remove dependencies on external resources 5:35
Lecture 21 Dependency injection inject objects that a class depends on
Lecture 22 Test object interactions verify how a dependency is used 4:47
Lecture 23 Customise the creation of the mock object the getMockBuilder method 5:22

Section 6 : Mockery - an alternative mocking framework with a human-readable syntax

Lecture 24 Mock a dependency that doesn't exist yet 4:11
Lecture 25 Using Mockery installation and integration with PHPUnit 2:22
Lecture 26 Using Mockery to mock a dependency that doesn't exist yet 3:38
Lecture 27 PHPUnit vs Mockery Returning different values on subsequent method calls 5:47
Lecture 28 Mockery Spies Make assertions on a call after the event 4:37

Section 7 : Test-driven development

Lecture 29 Test-driven development set up a TDD project 3:10
Lecture 30 Write the test first, then write the code to make it pass 3:16
Lecture 31 Write just enough code to make the test pass
Lecture 32 Add tests and refactor code until the tests pass 3:15
Lecture 33 Add more tests and application code functionality
Lecture 34 Another test, more functionality, and more refactoring 2:55
Lecture 35 Data providers provide a test method with a collection of data 5:50

Section 8 : Testing non-public methods and properties and abstract classes

Lecture 36 Testing non-public methods 3:9
Lecture 37 Testing protected methods using inheritance 3:17
Lecture 38 Testing private methods using reflection 2:23
Lecture 39 Testing private methods with arguments using reflection 2:44
Lecture 40 Testing protected and private attributes 1:56
Lecture 41 Testing abstract classes 4:48

Section 9 : Testing static methods

Lecture 42 Testing static methods 2:53
Lecture 43 The problem with static methods dependencies and mocking 4:7
Lecture 44 Option 1 Refactor code to remove the static method
Lecture 45 Option 2 Pass the dependency as a callable 4:29
Lecture 46 Option 3 Use Mockery alias mocks to stub the static method call 2:37