Why, Fatal error: Class 'PHPUnit_Framework_TestCase' not found in …?
问题 Why I'm getting this PHP error? Fatal error: Class 'PHPUnit_Framework_TestCase' not found in ... 回答1: The PHPUnit documentation says used to say to include/require PHPUnit/Framework.php, as follows: require_once ('PHPUnit/Framework/TestCase.php'); UPDATE As of PHPUnit 3.5, there is a built-in autoloader class that will handle this for you: require_once 'PHPUnit/Autoload.php'; Thanks to Phoenix for pointing this out! 回答2: For those arriving here after updating phpunit to version 6 or greater