| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- language: php
- php:
- - 5.3
- - 5.4
- env:
- - CAKE_VERSION=master
- - CAKE_VERSION=2.4
- before_script:
- - git clone --depth 1 --branch $CAKE_VERSION git://github.com/cakephp/cakephp ../cakephp && cd ../cakephp
- - rm -R app
- - git clone --depth 1 git://github.com/dereuromark/tools-app app && cd app && git checkout master
- - cd ..
- - cp -R ../tools plugins/Tools
- - sh -c "if [ 'mysql' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
- - mkdir ./app/tmp
- - mkdir ./app/tmp/logs
- - mkdir ./app/tmp/sessions
- - mkdir ./app/tmp/tests
- - mkdir ./app/tmp/cache
- - mkdir ./app/tmp/cache/persistent
- - mkdir ./app/tmp/cache/models
- - chmod -R 0777 ./app/tmp
- - echo "<?php
- class DATABASE_CONFIG {
- private \$identities = array(
- 'mysql' => array(
- 'datasource' => 'Database/Mysql',
- 'host' => '0.0.0.0',
- 'login' => 'travis'
- )
- );
- public \$default = array(
- 'persistent' => false,
- 'host' => '',
- 'login' => '',
- 'password' => '',
- 'database' => 'cakephp_test',
- 'prefix' => ''
- );
- public \$test = array(
- 'persistent' => false,
- 'host' => '',
- 'login' => '',
- 'password' => '',
- 'database' => 'cakephp_test',
- 'prefix' => ''
- );
- public function __construct() {
- \$db = 'mysql';
- if (!empty(\$_SERVER['DB'])) {
- \$db = \$_SERVER['DB'];
- }
- foreach (array('default', 'test') as \$source) {
- \$config = array_merge(\$this->{\$source}, \$this->identities[\$db]);
- if (is_array(\$config['database'])) {
- \$config['database'] = \$config['database'][\$source];
- }
- if (!empty(\$config['schema']) && is_array(\$config['schema'])) {
- \$config['schema'] = \$config['schema'][\$source];
- }
- \$this->{\$source} = \$config;
- }
- }
- }" > app/Config/database.php
- - cd app
- script:
- - ../lib/Cake/Console/cake test Tools AllTools
- notifications:
- email: false
|