language: php

sudo: false

php:
  - 5.4
  - 5.5
  - 5.6
  - 7.0

services: mongodb

before_install:
  - if [[ "$TRAVIS_PHP_VERSION" = 5.* ]]; then echo 'extension=mongo.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
  - if [[ "$TRAVIS_PHP_VERSION" != 5.* ]]; then echo 'extension=mongodb.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi
  - if [[ "$TRAVIS_PHP_VERSION" != 5.* ]]; then cp composer7.json composer.json; fi

install:
  - composer install --prefer-dist

script:
  - bin/phpunit -c tests/

notifications:
  email:
    - gediminas.morkevicius@gmail.com
    - developers@atlantic18.com
