Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phpunit default tests directory (for travis integration)

I've got a github project which I want to integrate with travis. Currently I execute my tests with:

phpunit tests

command. I would like to make the tests execute with:

phpunit

since travis needs it. I guess it's a matter of phpunit.xml.dist file, but I can't work out how to set it. Any help would be appreciated

like image 713
ducin Avatar asked Jul 02 '26 07:07

ducin


1 Answers

This should tell you the answer: https://github.com/travis-ci/travis-ci-php-example/blob/master/.travis.yml

In case that link ever ceases to exist, in your .travis.yml include the following lines:

# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
script: phpunit --configuration phpunit_$DB.xml --coverage-text
like image 87
qrazi Avatar answered Jul 05 '26 16:07

qrazi