language: php

php:
  - 5.3
  - 5.4
  - 5.5

env:
  - CAKE_VERSION=master DB=mysql

before_install:
  - sudo locale-gen --no-purge --lang pt_BR

before_script:
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
  - git clone --depth 1 git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp && git checkout $CAKE_VERSION
  - cp -R ../locale app/Plugin/Locale
  - echo "<?php
    class DATABASE_CONFIG {
    public \$default = array(
      'datasource' => 'Database/Mysql',
      'persistent' => false,
      'host' => '0.0.0.0',
      'login' => 'root',
      'password' => '',
      'database' => 'cakephp_test',
      'prefix' => ''
    );
    public \$test = array(
      'datasource' => 'Database/Mysql',
      'persistent' => false,
      'host' => '0.0.0.0',
      'login' => 'root',
      'password' => '',
      'database' => 'cakephp_test',
      'prefix' => '',
      'encoding' => 'utf8'
    );
    }" > ./app/Config/database.php

script:
  - ./lib/Cake/Console/cake test Locale AllLocaleTests

notifications:
  email: false
