language: php

php:
  - 5.3
  - 5.4

before_install:
 - cp tests/TestConfiguration.php.travis tests/TestConfiguration.php
 - composer install --dev
 - wget http://cs.sensiolabs.org/get/php-cs-fixer.phar

script:
 - phpunit -c ./tests/
 - output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 .); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;

notifications:
  irc: "irc.freenode.org#zftalk.dev"
  email: false
