When mocking class Imagick of the pecl/imagick extension 3.0.0, mocking fails with the following error message:
Fatal error: Call to a member function verify() on a non-object in /usr/share/php/PHPUnit/Framework/MockObject/Generator.php(172) : eval()'d code on line 4358
The testcase is quite easy:
class test extends PHPUnit_Framework_TestCase
{
public function test()
{
$mock = $this->getMock('Imagick');
}
}
The server is running Ubunt 10.04 with PHP 5.3.2 from the Ubuntu repository, Imagick installed via pecl and PHPUnit installed from PEAR.