一、目录结构 phpunit.xml:单元测试配置文件 tests:存放测试代码目录 build:生成测试报告目录 tests/bootstrap.php 脚手架入口 phpunit <?xml version="1.0" encoding="UTF-8"?> <phpunit bootstrap="tests/bootstrap.php" backupGlobals="false" backupStaticAttributes="false" beStrictAboutCoversAnnotation="true" beStrictAboutOutputDuringTests="true" beStrictAboutTestsThatDoNotTestAnything="true" beStrictAboutTodoAnnotatedTests="true" forceCoversAnnotation="true" strict="true" verbose="true"> <testsuites> <testsuite name="ProjectName"> <directory suffix=