When mocking an object with PHPUnit, all methods are automatically also mocked.
When you only want to cancel the constructor, but want the methods still to be
used, you can define that with using null as parameter for setMethods.
$handler = $this
->getMockBuilder('MyCustomHandler')
->disableOriginalConstructor(