调用未定义的方法PHP_CodeCoverage_Filter :: getInstance() [英] Call to undefined method PHP_CodeCoverage_Filter::getInstance()

查看:87
本文介绍了调用未定义的方法PHP_CodeCoverage_Filter :: getInstance()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在系统(Ubuntu 11)上安装了PHPUnit的新副本,但是每当我在控制台中键入phpunit时,都会出现以下错误:

I've got a fresh copy of PHPUnit installed on my system (Ubuntu 11), but whenever I type phpunit in the console I get the following error:

PHP Fatal error: Call to undefined method PHP_CodeCoverage_Filter::getInstance() in /usr/bin/phpunit on line 39

据我所知,我已经安装了PHPUnit的代码范围:

I have PHPUnit's code coverage installed, as far as I know:

>sudo pear install phpunit/PHP_CodeCoverage

phpunit/PHP_CodeCoverage is already installed and is the same as the released version 1.1.1

install failed

为什么会出现此错误,我该如何解决?

Why am I getting this error and how can I fix it?

推荐答案

在转到3.6.x时,必须未更新加载PHPUnit的可执行脚本.重新安装.

The executable script that loads PHPUnit must not have been updated when going to 3.6.x. Reinstall it.

sudo pear uninstall phpunit/PHPUnit
sudo pear install phpunit/PHPUnit

如果这不起作用,请 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆