🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
### 安装依赖包 ``` composer require --dev zendframework/zend-test ``` **运行初步测试** ``` ./vendor/bin/phpunit ``` Windows 中要加双引号 ``` "vendor/bin/phpunit" ``` ### 自动加载 > composer.json ```json "autoload-dev": { "psr-4": { "ApplicationTest\\": "module/Application/test/", "AlbumTest\\": "module/Album/test/" } } ``` 更新 ```bash composer dump-autoload ``` **引导配置** > phpunit.xml.dist ```xml <?xml version="1.0" encoding="UTF-8"?> <phpunit colors="true"> <testsuites> <testsuite name="ZendSkeletonApplication Test Suite"> <directory>./module/Application/test</directory> </testsuite> <testsuite name="Album"> <directory>./module/Album/test</directory> </testsuite> </testsuites> </phpunit> ``` 运行测试套件 ``` "vendor/bin/phpunit" --testsuite Album ```