Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/247.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我的要求不是';我不能和PHPUnit一起工作_Php_Unit Testing_Testing_Phpunit - Fatal编程技术网

我的要求不是';我不能和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_path
C:\xampp\htdocs
,但没有帮助。现在,我将所有库文件和依赖项移动到
pear
文件夹,它可以工作,但这是逃避问题的方法