phpunit : how to get the count of tests in a test directory without running test

喜你入骨 提交于 2019-12-25 07:11:50

问题


I would like to statically get a count of number of tests in a directory. Is there something available that I can use? Phpunit seems to have a count before test runs say 0/100 and increments it as the test completes. I would like to fetch that number before hand and exit the run possibly.


回答1:


The --count-tests option of phploc can give you, just like the grep / wc -l line shown above, an estimate of the number of tests. Due to data providers, for instance, there cannot be an exact number without actually executing the tests.



来源:https://stackoverflow.com/questions/30905363/phpunit-how-to-get-the-count-of-tests-in-a-test-directory-without-running-test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!