phpunit-pear方式从3.7升级到4.0的问题

上一篇 / 下一篇  2014-05-06 09:24:43 / 个人分类:phpunit



执行phpunit时,提示如下信息:
PHPUnit 4.0.17 by Sebastian Bergmann.

You have installed PHPUnit via PEAR. This installation method is no longer
supported and http://pear.phpunit.de/ will be shut down no later than
December, 31 2014.

Please read http://phpunit.de/manual/current/en/installation.html and
learn how to use PHPUnit from a PHAR or install it via Composer.



提示信息大意为:
你通过pear方式安装的phpunit,这种安装方法将不再长久支持,而且http://pear.phpunit.de/将在2014-12-31后关闭。
请阅读:http://phpunit.de/manual/current/en/installation.html,并学习如何通过phar使用phpunit,及通过Composer安装它。


另外,原来phpunit的测试代码,会在头部引入TestCase.php
require_once 'PHPUnit/Framework/TestCase.php';
升级到4.0后,会出现错误提示如下:
Fatal error: Call to undefined method PHPUnit_Util_Test::getOutputBufferingSettings() in D:\xampp\php\pear\PHPUnit\Framework\TestCase.php on line 536

注释该require_once即可解决;


TAG: 升级 问题 phpunit pear

 

评分:0

我来说两句

Open Toolbar