language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

install:
  - travis_retry composer install --no-interaction --prefer-source

script:
  - phpunit --coverage-text --coverage-clover=coverage.clover

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7
  - hhvm

install:
  - travis_retry composer install --no-interaction --prefer-source

script:
  - if [ "$TRAVIS_PHP_VERSION" == "hhvm" ]; then vendor/bin/phpunit; fi
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover; fi

after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi

Use locally-installed PHPUnit instead of phar
Use locally-installed PHPUnit instead of phar

Avoiding the use of Travis' pre-built phar allows us to work around this
HHVM issue: https://github.com/facebook/hhvm/issues/5215