diff --git a/.travis.yml b/.travis.yml index 1750dad..c006d01 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ before_script: - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database todo_test;' -U postgres; fi" - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS todo_test;'; fi"; - - export ENVRIONMENT=testing-${DB} script: - vendor/bin/phinx migrate -e testing -c tests/phinx/$DB.yml diff --git a/application/third_party/CIUnit/bootstrap_phpunit.php b/application/third_party/CIUnit/bootstrap_phpunit.php index e558ae6..85118d8 100755 --- a/application/third_party/CIUnit/bootstrap_phpunit.php +++ b/application/third_party/CIUnit/bootstrap_phpunit.php @@ -32,7 +32,7 @@ exit; * NOTE: If you change these, also change the error_reporting() code below * */ - $env_part = (isset($_ENV['DB'])) ? $_ENV['DB'] : ''; + $env_part = (getenv('DB')) ? getenv('DB') : ''; define('ENVIRONMENT', ( ! empty($env_part)) ? "testing-{$env_part}" : 'testing'); /* *---------------------------------------------------------------