开发者

PHPUnit Version issue and Mock Builder

I am 开发者_JAVA技巧facing a version issue with phpunit . When I execute pear install pear.phpunit.de/PHPUnit I get an error: phpunit/PHPUnit is already installed and is the same as the released version 3.5.15 install failed

But when I execute phpunit --version, I get PHPUnit 3.4.5 by Sebastian Bergmann.

I do not understand what is happening here. I stumbled on the issue when all of my mock builder functions (setMethod(), getMockBuilder()...etc) threw a undefined method fatal errors and I figured that these methods are only available in 3.5 and up.

All your help is really appreciated. Thanks.


If you're on some flavor of Unix/Linux, what does which phpunit report? This should hopefully lead you to your second installation. You can start by renaming the file returned by which.


Chances are you need to upgrade your pear version. It should be 1.9.4 (or higher) to work properly.

Try pear update pear and once pear version shows 1.9.4 try pear install phpunit/PHPUnit. It that doesn't help use --force --alldeps arguments.

That should to the trick.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜