作者:Imzgu_208 | 来源:互联网 | 2023-05-17 13:02
Icurrentlyhavemultipletestrunnerswhichonlydiffersfromeachotherintheworkingdirectory.
I currently have multiple test runners which only differs from each other in the working directory. All of them uses the same bootstrap.php which configures the class autoload. I recently added test group annotations to my tests and I exclude tests depending on PHP versions. Currently I add test runner options for example --exclude-group closure-binding
under php 5.4, but for those I have to duplicate every test runner and set the options manually. I think it would be much better if I could add modifications to the bootstrap.php and setup the group exclusion from there. Is there a way to do that?
我目前有多个测试运行器,它们在工作目录中只是彼此不同。所有这些都使用相同的bootstrap.php来配置类自动加载。我最近在测试中添加了测试组注释,并根据PHP版本排除了测试。目前我在php 5.4下添加了测试运行器选项 - 例如--exclude-group closure-binding,但对于那些我必须复制每个测试运行器并手动设置选项的选项。我认为如果我可以添加对bootstrap.php的修改并从那里设置组排除会更好。有没有办法做到这一点?
(phpunit version 3.7.x)
(phpunit版本3.7.x)
2 个解决方案