Skip to content

Mocking class Imagick of pecl/imagick 3.0.0 fails with PHPUnit 3.4.2 and 3.5 beta1 #3

@lstrojny

Description

@lstrojny

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions