title: Phpunit: replace class with mock
body: <p>Is it possible to replace some class instantiation with the mock one so that when I call <code>new SomeClass()</code> the mock one is created with specified mocked behavior?</p>