I am using Zend FW 1 and PHPUnit 3.5.15.
In a parent class I am declaring public static function _doInsert(DomainObject $object) and I am overriding this in a child class.
The only difference in the method signature of the child class is that it hints for an object that is more specific than DomainObject, something like DomainObjectChild. This seems to work fine as far as my application goes, however PHPUnit chokes with an error. It says that the declaration of the method in the child class should be compatible with that of the parent.
Any ideas, my bright friends?
This is an
E_STRICTlevel warning that is coming from PHP, not PHPUnit. Check yourerror_reportingsettings for the CLI version of PHP (which usually has a seperate php.ini file) or any PHP settings being overridden in your PHPUnit configuration.You can either fix the problem in your code to remove the warning, or change the error_reporting level that PHPUnit is using.