When I\'m unit-testing my php code with PHPUnit, I\'m trying to figure out the right way to mock an object without mocking any of its methods.
The problem is that if
Another hacky, but succinct solution is simply to list the magic constructor as one of the mocked methods:
$mock = $this->getMock('MyClass', array('__construct'));