Class 在“<full path to class.php>”phpunit 测试中找不到“<full path to class>”

Class '<full path to class>' could not be found in '<full path to class.php>' phpunit testing

我正在尝试使用 phpunit 进行测试。

我有一个看起来像这样的文件(用于试用):

<?php
class NewController {
    protected $name;

    public function __construct($name)
    {
        $this->name = $name;
    }


}

当我 运行 phpunit (v. 5.2) - 我看到以下错误:

Class 'C:\xampp\htdocs\test\NewController' could not be found in 'C:\xampp\htdocs\test\NewController.php'.

我确定这是我遗漏的简单问题 - 但另一双眼睛可能会有所帮助。

看来phpunit的安装有问题。一旦 uninstalled/reinstalled 它就可以正常工作。