language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm

env:
  global:
    - TEST_COMMAND="composer test"

matrix:
  allow_failures:
    - php: 7.0
  fast_finish: true
  include:
    - php: 5.4
      env:
        - COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
        - COVERAGE=true
        - TEST_COMMAND="composer test-ci"

before_install:
  - travis_retry composer self-update

install:
  - travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction

before_script:
  - vendor/bin/http_test_server > /dev/null 2>&1 &

script:
  - $TEST_COMMAND

after_success:
  - if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0
  - hhvm

env:
  global:
    - TEST_COMMAND="composer test"

matrix:
  allow_failures:
    - php: 7.0
  fast_finish: true
  include:
    - php: 5.4
      env:
        - COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
        - COVERAGE=true
        - TEST_COMMAND="composer test-ci"

before_install:
  - travis_retry composer self-update

install:
  - travis_retry composer update ${COMPOSER_FLAGS} --prefer-source --no-interaction

script:
  - $TEST_COMMAND

after_success:
  - if [[ "$COVERAGE" = true ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
  - if [[ "$COVERAGE" = true ]]; then php ocular.phar code-coverage:upload --format=php-clover build/coverage.xml; fi

Remove HTTP server from testing
Remove HTTP server from testing
