language: php

php:
  - 5.3
  - 5.4

env:
  - DB=mysql
  - DB=sqlite

before_script:
  - cd ..
  - git clone git://github.com/zendframework/ZendSkeletonApplication.git --recursive
  - cd ZendSkeletonApplication
  - cd vendor && mv ~/builds/cdli/CdliTwoStageSignup . && cd - >/dev/null
  - cp vendor/CdliTwoStageSignup/.travis/composer.json.dist composer.json
  - php ./composer.phar install
  - cp vendor/CdliTwoStageSignup/.travis/application.config.php config/
  - cp vendor/CdliTwoStageSignup/.travis/database_$DB.local.php config/autoload/
  - cp vendor/CdliTwoStageSignup/.travis/module.zfcuser.local.php config/autoload/
  - cp vendor/CdliTwoStageSignup/.travis/module.cdlitwostagesignup.local.php config/autoload/
  - cp vendor/CdliTwoStageSignup/tests/phpunit.xml.dist vendor/CdliTwoStageSignup/tests/phpunit.xml
  - if [[ "$DB" == "mysql" ]]; then mysql -uroot -e 'create database travis_test'; fi

script:
  - cd vendor/CdliTwoStageSignup/tests
  - phpunit

language: php

php:
  - 5.3
  - 5.4

env:
  - DB=mysql
  - DB=sqlite

before_script:
  - cd ..
  - git clone git://github.com/zendframework/ZendSkeletonApplication.git
  - cd ZendSkeletonApplication
  - cd vendor && mv ~/builds/cdli/CdliTwoStageSignup . && cd - >/dev/null
  - cp vendor/CdliTwoStageSignup/.travis/composer.json.dist composer.json
  - php ./composer.phar install
  - cp vendor/CdliTwoStageSignup/.travis/application.config.php config/
  - cp vendor/CdliTwoStageSignup/.travis/database_$DB.local.php config/autoload/
  - cp vendor/CdliTwoStageSignup/.travis/module.zfcuser.local.php config/autoload/
  - cp vendor/CdliTwoStageSignup/.travis/module.cdlitwostagesignup.local.php config/autoload/
  - cp vendor/CdliTwoStageSignup/tests/phpunit.xml.dist vendor/CdliTwoStageSignup/tests/phpunit.xml
  - if [[ "$DB" == "mysql" ]]; then mysql -uroot -e 'create database travis_test'; fi

script:
  - cd vendor/CdliTwoStageSignup/tests
  - phpunit

Remove --recursive from git clone so ZF2 isn't cloned twice
[Travis-CI] Remove --recursive from git clone so ZF2 isn't cloned twice
