language: php
php:
  - 5.3
  - 5.4
  - 5.5
  
before_script:  
  # Install code quality tools
  - wget http://pear.phpunit.de/get/phpcpd.phar
  
  # Install composer for dependency management
  - wget http://getcomposer.org/composer.phar   
  
  # Set the GitHub OAuth token to make use of the 6000 per hour rate limit
  - "mkdir -p ~/.composer"
  - cp .travis.composer.config.json ~/.composer/config.json   
  
  # Build!
  #- mkdir app/cache/test  
  - mv app/config/parameters.yml.travis app/config/parameters.yml
  - mv --force app/config/config_travis.yml app/config/config_test.yml
  - cp src/SimplyTestable/WebClientBundle/Resources/config/parameters.yml.travis src/SimplyTestable/WebClientBundle/Resources/config/parameters.yml
  - php composer.phar install
  - php app/console doctrine:database:create
  - php app/console doctrine:migrations:migrate --no-interaction
  
script:
  - phpunit -c app
  - php phpcpd.phar --exclude src/SimplyTestable/WebClientBundle/Tests/ src/SimplyTestable/WebClientBundle/
language: php
php:
  - 5.3
  - 5.4
  - 5.5
  
before_script:  
  # Install code quality tools
  - wget http://pear.phpunit.de/get/phpcpd.phar
  
  # Install composer for dependency management
  - wget http://getcomposer.org/composer.phar   
  
  # Set the GitHub OAuth token to make use of the 6000 per hour rate limit
  - "mkdir -p ~/.composer"
  - cp .travis.composer.config.json ~/.composer/config.json   
  
  # Build!
  #- mkdir app/cache/test  
  - mv app/config/parameters.yml.travis app/config/parameters.yml
  - mv --force app/config/config_travis.yml app/config/config_test.yml
  - cp src/SimplyTestable/WebClientBundle/Resources/config/parameters.yml.travis src/SimplyTestable/WebClientBundle/Resources/config/parameters.yml
  - php composer.phar install
  - php app/console doctrine:database:create
  - php app/console doctrine:migrations:migrate --no-interaction
  
script:
  - phpunit -c app
  - php phpcpd.phar --exclude src/SimplyTestable/WebClientBundle/Tests/ src/SimplyTestable/WebClientBundle/
  
after_script:
  - php phpcpd.phar --exclude src/SimplyTestable/WebClientBundle/Tests/ src/SimplyTestable/WebClientBundle/ 
Move phpcpd check to after_script to prevent build failure
Move phpcpd check to after_script to prevent build failure
