我的要求不是';我不能和PHPUnit一起工作
我想测试我的库,但当我想在测试类中要求它的文件并使用我的要求不是';我不能和PHPUnit一起工作,php,unit-testing,testing,phpunit,Php,Unit Testing,Testing,Phpunit,我想测试我的库,但当我想在测试类中要求它的文件并使用phpunit filename.php运行它时,我得到如下错误: Warning: require_once(>>>path to file<<<): failed to open stream: No such file or directory in >>>file with test<<< on line 3 Fatal error: require_once()
phpunit filename.php
运行它时,我得到如下错误:
Warning: require_once(>>>path to file<<<): failed to open stream: No such
file or directory in >>>file with test<<< on line 3
Fatal error: require_once(): Failed opening required >>>path to file<<<
(include_path='.;C:\xampp\php\PEAR') in >>>file with test<<< on line 3
警告:需要\u一次(>>>path to filefile with test>path to file>file with test错误消息告诉您,include_path
配置为包含来自当前工作目录和PEAR目录的文件。换句话说,PHPUnit将尝试包含来自PEAR目录或在中调用PHPUnit的任何目录的测试文件。请考虑添加正在将具有正确配置的phpunit.xml添加到引导文件。请参阅,我恐怕尝试添加到include_pathC:\xampp\htdocs
,但没有帮助。现在,我将所有库文件和依赖项移动到pear
文件夹,它可以工作,但这是逃避问题的方法