【发布时间】:2011-05-09 11:06:41
【问题描述】:
我已经安装了PHPUnit 并检查了我的PEAR 设置,一切正常。我使用Yii 作为我的框架,并且我在Linux 共享服务器上。当我运行测试(任何测试)时,我会收到以下错误。据我所知,我认为我需要在路径设置中添加以下内容:
/home/myname/php/
因为那是 PHP 和 PHPUnit 文件夹所在的位置。我无法修改 php.ini 文件,因为我在共享服务器上。我想知道这是否真的是问题,是否有其他人在共享环境中发现并解决了这个问题?
/protected/tests/unit]# phpunit dbTest.php
X-Powered-By: PHP/5.2.9
Content-type: text/html
<br />
<b>Warning</b>: require_once(PHPUnit/Util/Filter.php) [<a href='function.require-once'>function.require-once</a>]: failed to open stream: No such file or directory in /home/myname/bin/phpunit on line 40<br />
<br />
<b>Fatal error</b>: require_once() [<a href='function.require'>function.require</a>]: Failed opening required 'PHPUnit/Util/Filter.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/myname/bin/phpunit on line 40
【问题讨论】: