padraic/mockery — Issue #43: PHP Fatal error:  Call to undefined method PHP_CodeCoverage_Filter::getInstance()
Author: isidromerayo
Created: 2011-12-27 10:19:26+00:00
State: open

Hi,
I try to using PHPUnit Integration, but I have a problem...

PHP Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/share/php/Mockery/Adapter/Phpunit/TestListener.php on line 46
PHP Stack trace:
PHP 1. {main}() /usr/bin/phpunit:0
PHP 2. PHPUnit_TextUI_Command::main($exit = *uninitialized*) /usr/bin/phpunit:44
PHP 3. PHPUnit_TextUI_Command->run($argv = array (0 => '/usr/bin/phpunit'), $exit = TRUE) /usr/share/php/PHPUnit/TextUI/Command.php:125
PHP 4. PHPUnit_TextUI_TestRunner->doRun($suite = class PHPUnit_Framework_TestSuite { protected $backupGlobals = NULL; protected $backupStaticAttributes = NULL; protected $name = 'Unit test suite'; protected $groups = array ('__nogroup__' => array (...)); protected $tests = array (0 => class PHPUnit_Framework_TestSuite { ... }); protected $numTests = 1; protected $testCase = FALSE }, $arguments = array ('listGroups' => FALSE, 'loader' => NULL, 'useDefaultConfiguration' => TRUE, 'configuration' => '/home/imerayo/PhpstormProjects/point-of-sale/tests/phpunit.xml')) /usr/share/php/PHPUnit/TextUI/Command.php:187

I only add to my phpunit.xml

My enviroment is

# php -v
PHP 5.3.6-13ubuntu3.3 with Suhosin-Patch (cli) (built: Dec 13 2011 18:18:37)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies
with Xdebug v2.1.2, Copyright (c) 2002-2011, by Derick Rethans
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH

# pear list -c phpunit
Installed packages, channel pear.phpunit.de:
============================================
Package Version State
DbUnit 1.1.1 stable
File_Iterator 1.3.0 stable
PHPUnit 3.6.5 stable
PHPUnit_MockObject 1.1.0 stable
PHPUnit_Selenium 1.1.3 stable
PHP_CodeCoverage 1.1.1 stable
PHP_Invoker 1.0.1 stable
PHP_Timer 1.0.2 stable
PHP_TokenStream 1.1.1 stable
Text_Template 1.1.1 beta
phpcpd 1.3.5 stable
phploc 1.6.4 stable
ppw 1.0.4 stable

# pear list -c deepend
Installed packages, channel pear.survivethedeepend.com:
=======================================================
Package Version State
Mockery 0.7.1 stable

Sorry but my poor english.
Thanks!