Reputation: 13214
I have a big phpunit test suite (in fact it's four testsuites for this particular project) and when executing, phpunit shows that there are 903 tests:
............................................................... 63 / 903 ( 6%)
When it's done, it shows the result:
OK (901 tests, 1872 assertions)
As you can see, I'm missing two tests. This can be because they have a incorrect group (my phpunit.xml filters groups) or maybe there is something wrong. As there are so many tests, I have no clue how to find the tests which don't get executed. Is there any way to get the names of this tests?
Upvotes: 0
Views: 893
Reputation: 13214
The reason for this behaviour where two private methods which where prefixed with the word "test". It seems that for the total count of tests, phpunit takes into account all methods prefixed with "test", no matter if they can be executed or not.
I found out about it using the --list-groups
options on phpunit, which gave me a a group named __nogroup__
. Executing only this tests using --group __nogroup__
gave me the class in which the two private methods where located.
Upvotes: 2