Trying to do a simple mock of Zend_Config for a method that requires a Zend_Config object type, but the mock returns a type of Mock_Zend_Config.
Surely I missed something at this late hour and I am obviously wrong in the function call but I fail to spot my error.
$config = $this->getMock("Zend_Config");
Returns Mock_Zend_Config, and my object needs to be of type Zend_Config. Looked up the function signature in a cheatsheet and changed the method call to:
$config = $this->getMock("Zend_Config", array(), array($confArray),"Zend_Config",true);
This version generates a fatal error with message "Zend_Config already exists".
On a sidenote and probably not related to phpunit as such but the typehint does not generate a fatal error as it should , and does so when run without tests.
Any idea of what I'm missing in la mock?