Skip to content
Advertisement

PHPUnit – suffix argument ignored in directory tag under testsuite

I recently realized that I cannot run all my phpunit tests at once unless I use the “php artisan test”, and I don’t understand why. I would use the other option but I can’t do coverage with that.

I assume it’s somehow related to my configuration file being wrong because of a syntax change, or my directory being set wrong or something, because I can’t find anything else.

The suite is found, but the suffix is not applied, whether I write it as “.php” or “Tests.php” or anything else. I know, because if I rename all my test files with Test at the end instead of Tests, then they suddently get recognized by phpunit. I also tried all numbers of directory options, like “./tests/Unit” and “./tests/Unit/*” but to no avail.

I would really appreciate some help if anyone has any idea what is happening, because it’s driving me crazy. It took me a day to figure out I needed to rename my files just to make it work, and at this point I don’t even want to do that unless I absolutely must, since there is this suffix feature.

I just want to understand why it does not work, and how to use it properly, in hopes of being able to learn how to use phpunit in the right way.

Tests, configuration, and the tests being ignored on run

Advertisement

Answer

Nothing worked to fix the suffix. I tried reinstalling xdebug, php, and phpstorm. I ended up just renaming the files as I said. Only working solution I could find.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement