fatal error 'File/Iterator/Autoload.php' not found when running phpunit

后端 未结 11 1221
滥情空心
滥情空心 2020-12-09 08:30

I am getting this error while i tried to run testclass in phpunit.

C:\\xampp\\htdocs\\unittest>phpunit UnitTest usertest.php
PHP Warning:  require_once(Fi         


        
11条回答
  •  粉色の甜心
    2020-12-09 09:14

    I had the same problem using PhP 5.3 on OSX 10.6 using the built-in server configuration.

    I noticed that while PHPUnit was being successfully installed to /usr/lib/php, Autoload.php was trying (line 45) to load the File Iterator from its current directory (/usr/lib/php/PHPUnit) rather than the directory Pear was installing it to (/usr/lib/php/File). Could this be a bug in the Pear installer?

    A simple ln -s /usr/lib/php/File /usr/lib/php/PHPUnit/File solved the problem.

提交回复
热议问题