language: php

php:
    - 5.3
    - 5.4

env:
    - WP_VERSION=latest
    - WP_VERSION=3.4.2

matrix:
  exclude:
    - php: 5.4
      env: WP_VERSION=3.4.2

before_script:
    # install dependencies
    - composer install --dev --no-interaction --prefer-source
    # set up WP install
    - WP_CORE_DIR=/tmp/wp-cli-test-core-download-cache/
    - mkdir -p $WP_CORE_DIR
    - wget -nv -O /tmp/wordpress.tar.gz http://wordpress.org/wordpress-$WP_VERSION.tar.gz
    - tar --strip-components=1 -zxmf /tmp/wordpress.tar.gz -C $WP_CORE_DIR
    # set up database
    - mysql -e 'CREATE DATABASE wp_cli_test;' -uroot
    - mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot

script: vendor/bin/phpunit && vendor/bin/behat

language: php

php:
    - 5.3
    - 5.4

env:
    - WP_VERSION=latest
    - WP_VERSION=3.4.2

matrix:
  exclude:
    - php: 5.4
      env: WP_VERSION=3.4.2

before_script:
    # install dependencies
    - composer install --dev --no-interaction --prefer-source
    # set up WP install
    - bin/wp core download --version=$WP_VERSION --path=/tmp/wp-cli-test-core-download-cache/
    # set up database
    - mysql -e 'CREATE DATABASE wp_cli_test;' -uroot
    - mysql -e 'GRANT ALL PRIVILEGES ON wp_cli_test.* TO "wp_cli_test"@"localhost" IDENTIFIED BY "password1"' -uroot

script: vendor/bin/phpunit && vendor/bin/behat

Use `wp core download` in Travis tests too.
Use `wp core download` in Travis tests too.
