language: php
php:
- '7.1'
- '7.0'
- '5.6'
- '5.5'
- '5.4'
- '5.3'
- '5.2'

install:
- phpenv local 5.3
- composer install
- phpenv local --unset

script:
- echo $TRAVIS_PHP_VERSION
- if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then phpunit; else ./vendor/bin/phpunit; fi

language: php
php:
- '7.1'
- '7.0'
- '5.6'
- '5.5'
- '5.4'
- '5.3'
- '5.2'

install:
- phpenv local 5.3
- composer install
- if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then composer remove phpunit/phpunit; fi
- phpenv local --unset

script:
- echo $TRAVIS_PHP_VERSION
- if [[ "$TRAVIS_PHP_VERSION" == "5.2" ]]; then phpunit; else ./vendor/bin/phpunit; fi

Exclude PHPUnit if PHP5.2 is loaded
Exclude PHPUnit if PHP5.2 is loaded

This is because we use the pre-installed PHPUnit for PHP5.2 and when we
keep it installed the autoload for PHPUnit will break stuff :(
