Video archive

Mocking Dependencies in Unit Tests with Phake

Video details

Speaker: Matthew Turland
Length: 50:25

Description

Reports of the death of TDD have been greatly exaggerated. All but the most trivial of applications make use of the OOP principle of composition and as such require mocking of dependencies in unit tests. While PHPUnit has become the de facto unit testing framework for many projects, its bundled mocking API can leave something to be desired. This presentation is an introduction to Phake, an alternative mocking library with a more concise and intuitive API and a more substantial feature set that removes the headaches from mocking.

Stay up-to-date with PHP UK

Enter your email address to join the PHP UK Conference mailing list and be the first to hear our latest news and announcements.