PHPSpec – Array of mocks in constructor: a practical example
If you know PHPSpec a bit, you certainly are aware of let function.
1 2 3 4 |
function let(EntityManager $em) { $this->beConstructedWith($em); } |
that helps you to define “automagic” mocks handled directly by PHPSpec and that you can pass to…