Using Mocks with PHPUnit
Creating test doubles, or mocks, is a feature of PHPUnit that I recently discovered and am quickly falling in love with. Previously I would find other ways to mock my system, like creating SQLite connections instead of a persistent database, or even duplicating an entire mock class for injection.…