运行 phpunit 时找不到致命错误“文件/迭代器/自动加载.php”
2022-08-30 16:00:41
当我尝试在phpunit中运行testclass时,我得到了这个错误。
C:\xampp\htdocs\unittest>phpunit UnitTest usertest.php
PHP Warning: require_once(File/Iterator/Autoload.php): failed to open stream No such file or directory in C:\xampp\php\pear\PHPUnit\Autoload.php on line 45
PHP Stack trace:
PHP 1. {main}() C:\xampp\php\phpunit:0
PHP 2. require() C:\xampp\php\phpunit:41
Warning: require_once(File/Iterator/Autoload.php): failed to open stream: No such file or directory in C:\xampp\php\pear\PHPUnit\Autoload.php on line 45
Call Stack:
0.0004 325352 1. {main}() C:\xampp\php\phpunit:0
0.0026 366520 2. require('C:\xampp\php\pear\PHPUnit\Autoload.php')xampp\php\phpunit:41
PHP Fatal error: require_once(): Failed opening required 'File/Iterator/Autoload.php' (include_path='.;C:\php\pear') in C:\xampp\php\pear\PHPUnit\Autoload.php on line 45
PHP Stack trace:
PHP 1. {main}() C:\xampp\php\phpunit:0'
任何人都可以解决这个问题吗?
注意:我正在使用Windows 7。
谢谢