Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
54 lines (49 sloc) 1.45 KB
language: php
php:
- 5.3
- 5.4
- 5.5
env:
- DB=mysql CAKEPHP=2.3.10
- DB=mysql CAKEPHP=2.4.10
- DB=mysql CAKEPHP=2.5.6
before_script:
- composer install --dev
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
- wget https://github.com/cakephp/cakephp/tarball/$CAKEPHP -O cake.tar.gz
- tar xf cake.tar.gz
- mv cakephp-cakephp-* ./cakephp
- chmod -R 777 ./cakephp/app/tmp
- echo "<?php
App::build(array(
'Plugin' => array('/home/travis/build/k1LoW/'),
));
CakePlugin::loadAll();
ini_set('include_path', '/home/travis/build/k1LoW/Yacsv/vendor/phpunit/phpunit' . PATH_SEPARATOR . ini_get('include_path'));
" > cakephp/app/Config/bootstrap.php
- 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'
);
}" > cakephp/app/Config/database.php
- cd ./cakephp
script:
- ./lib/Cake/Console/cake test Yacsv Model/Behavior/ImporterBehavior --stderr
- ./lib/Cake/Console/cake test Yacsv Lib/CsvGenerator --stderr