Access the full course ➤ https://davehollingworth.net/phpunity
We use test doubles to isolate the class we're testing, so we can test it without any reliance on external dependencies. Sometimes we want to write and test a class before its dependencies exist. In this video you'll learn how to mock a non-existent class using PHPUnit.