PHPUnit_Framework_TestCase? could not be found for PHPUnit operation

first look at the directory structure and errors

clipboard.png

:

phpunit

clipboard.png

Why doesn"t it run?

Mar.16,2021

the namespace of phpunit needs to be introduced in MoneyTest use\ PHPUnit\ Framework\ PHPUnit_Framework_TestCase


I found the answer. It turned out to be a version problem
5.7.The document should inherit TestCase from the beginning

class StackTest extends PHPUnit\Framework\TestCase;

and my version is 6.0.7, so it should not inherit \ PHPUnit\ Framework\ PHPUnit_Framework_TestCase , thus solving


so the test is ready

composer install
./vendor/bin/phpunit --bootstrap vendor/autoload.php
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-7c2f9a-16605.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-7c2f9a-16605.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?