Home > PHP前沿 | 开发技术 | 软件测试 > Kohana 3.1 unittest在phpunit 3.6版本中出错的解决办法

Kohana 3.1 unittest在phpunit 3.6版本中出错的解决办法

2011年12月2日 No Comments

问题1:

modules\unittest\classes\kohana\unittest\tests.php中的$filter = PHP_CodeCoverage_Filter::getInstance();报错

处理办法:

//$filter = PHP_CodeCoverage_Filter::getInstance();
//修改为以下代码
$filter = new PHP_CodeCoverage_Filter();

问题2:

modules\unittest\classes\kohana\unittest\runner.php中的$this->result->collectCodeCoverageInformation( (bool) $collect_cc);报错

处理办法:

//$this->result->collectCodeCoverageInformation( (bool) $collect_cc);
//修改为以下代码
$this->result->getCollectCodeCoverageInformation( (bool) $collect_cc);

完成后就可以使用,上图:

Popularity: 8% [?]

Tags: PHP PHPUNIT

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">