composer require phpunit/phpunit --dev
vendor/bin/phpunit --generate-configuration
PHPUnit 6.3.0 by Sebastian Bergmann and contributors.
Generating phpunit.xml in C:\Users\recca\UniServerZ\www\mockery_demo
Bootstrap script (relative to path shown above; default: vendor/autoload.php):
Tests directory (relative to path shown above; default: tests):
Source directory (relative to path shown above; default: src):
Generated phpunit.xml in C:\Users\recca\UniServerZ\www\mockery_demo
修改 composer.json
{
"autoload": {
"psr-4": {
"Acme\\": "src/"
}
}
}
執行
composer dump-autoload