ducin
ducin

Reputation: 26477

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

Upvotes: 3

Views: 999

Answers (1)

qrazi
qrazi

Reputation: 1391

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

Upvotes: 5

Related Questions