使用PHPUnit 8.5运行多个目录



如果我想在一个目录中运行所有测试文件,我可以运行phpunit tests/path/to/directory。但是,如果我运行phpunit tests/path/1 tests/path/2,其中12都是包含测试文件的目录,它会抱怨Fatal error: Uncaught PHPUnitRunnerException: Class 'tests/path/1' could not be found。如何在一个命令中运行两个目录?

最佳做法是不使用CLI上的路径调用PHPUnit测试运行程序,而是在XML配置文件中配置路径。

最新更新