I try to run from the root ./vendor/phpunit/phpunit/phpunit -c phpunit.xml.dist ./web/modules/custom however I get a PHP Fatal error: Class 'Drupal\Tests\BrowserTestBase' not found error (even-though it's properly declared).
I tried to execute it also from inside the web, but it doesn't work. What is the proper way to run those tests, so I could also add it to Travis?
./vendor/bin/phpunit -c ./web/core ./web/modules/contrib/ should work. phpunit.xml.dist is to test the project template itself. Not Drupal core and modules.
./vendor/bin/phpunit -c ./web/core ./web/modules/custom/ for custom modules.
oh yeah, I tried with that one as-well. I've probably done something wrong, I'll re-check. Closing for now. Thanks :)
Great, it's working
Sorry to raise this issue again. But, to me, having phpunit.xml.dist in template folder is still confusing. May be there should be some comments on how to run phpunit tests and on what level? Or renaming the file would work probably. But by default no one will specify the configuration file which will be exactly the template level phpunit.xml file.
Most helpful comment
./vendor/bin/phpunit -c ./web/core ./web/modules/custom/for custom modules.