language: php
script: phpunit --bootstrap src/autoload.php tests
php:
  - '5.6'
  - '7.0'
  - '7.1'
  - '7.2'
before_script:
- |
  echo "TRAVIS_PHP_VERSION:" $TRAVIS_PHP_VERSION;
  php -v;
  php -r 'echo "PHP: ".PHP_VERSION."\n";';
  if [ $(echo "$TRAVIS_PHP_VERSION >= 7.0" | bc -l) -eq 1 ]; then
    echo using PHPUnit 6.5.9
    curl -sSfL -o ~/.phpenv/versions/$TRAVIS_PHP_VERSION/bin/phpunit https://phar.phpunit.de/phpunit-6.5.9.phar;
  fi
install:
  - composer install