What is the way to avoid phpunit having to call the constructor for a mock object? Otherwise I would need a mock object as constructor argument, another one for that etc. The api seems to be like this:
getMock($className, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = TRUE, $callOriginalClone = TRUE, $callAutoload = TRUE)
I don’t get it to work. It still complains about the constructor argument, even with
$callOriginalConstructor set to false.
I only have one object in the constructor and it is a dependency injection. So I don’t think I have a design problem there.