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

后端 未结 11 1254
滥情空心
滥情空心 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:15

    A possible reason that this might happen is that your php include_path is not set correctly. Please make sure you have the appropriate path to PEAR available. For my WAMP installation it would be:

    include_path=".;C:\wamp\bin\php\php5.3.8\PEAR\PEAR"
    

    However, it will most likely be different on your system.

    A side note, you will want to update both your apache php.ini, as well as your php.ini located in your PHP installation folder. CLI the default php.ini, and web requests (and often times other software that you might be using PEAR packages for) will use the apache php.ini.

    Hope this helps.

提交回复
热议问题