diff --git a/.travis.yml b/.travis.yml index 6de055d..1750dad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,8 +9,8 @@ install: - composer install env: - - DB=mysql, ENVIRONMENT=testing-mysql - - DB=pgsql, ENVIRONMENT=testing-pgsql + - DB=mysql + - DB=pgsql before_script: - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi" @@ -30,7 +30,7 @@ after_script: matrix: exclude: - php: hhvm - env: DB=pgsql, ENVIRONMENT=testing-pgsql + env: DB=pgsql allow_failures: - php: hhvm fast_finish: true \ No newline at end of file diff --git a/application/third_party/CIUnit/bootstrap_phpunit.php b/application/third_party/CIUnit/bootstrap_phpunit.php index abf205d..e558ae6 100755 --- a/application/third_party/CIUnit/bootstrap_phpunit.php +++ b/application/third_party/CIUnit/bootstrap_phpunit.php @@ -32,7 +32,8 @@ exit; * NOTE: If you change these, also change the error_reporting() code below * */ - define('ENVIRONMENT', 'testing'); + $env_part = (isset($_ENV['DB'])) ? $_ENV['DB'] : ''; + define('ENVIRONMENT', ( ! empty($env_part)) ? "testing-{$env_part}" : 'testing'); /* *--------------------------------------------------------------- * ERROR REPORTING