language: php

php: [5.3, 5.4, 5.5, 5.6, hhvm]

before_install:
  # Force using Goutte 2 on HHVM for now because Guzzle 6 is broken there
  - if [ "hhvm" = "$TRAVIS_PHP_VERSION" ]; then composer require fabpot/goutte '~2' --no-update; fi

before_script:
  - export WEB_FIXTURES_HOST=http://localhost

  - composer install --dev --prefer-source

  - sudo apt-get update
  - sudo apt-get install -y --force-yes apache2 libapache2-mod-php5
  - sudo sed -i -e "s,/var/www,$(pwd)/vendor/behat/mink/driver-testsuite/web-fixtures,g" /etc/apache2/sites-available/default
  - sudo /etc/init.d/apache2 restart

script: phpunit -v --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

sudo: false

cache:
  directories:
    - $HOME/.composer/cache

php: [5.3, 5.4, 5.5, 5.6, hhvm]

before_install:
  # Force using Goutte 2 on HHVM for now because Guzzle 6 is broken there
  - if [ "hhvm" = "$TRAVIS_PHP_VERSION" ]; then composer require fabpot/goutte '~2' --no-update; fi

install:
  - composer install

before_script:
  - export WEB_FIXTURES_HOST=http://localhost:8000

  # Start a webserver for web fixtures. Force using PHP 5.6 to be able to run it on PHP 5.3 and HHVM jobs too
  - ~/.phpenv/versions/5.6/bin/php -S localhost:8000 -t vendor/behat/mink/driver-testsuite/web-fixtures > /dev/null 2>&1 &

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

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

Switch to the Docker-based infrastructure on Travis
Switch to the Docker-based infrastructure on Travis
