From a59b7132051429564393230033e140d60649110a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Mo=CC=88ller?= Date: Fri, 10 Jul 2015 00:09:36 -0400 Subject: [PATCH] Fix: One phpunit.xml to rule them all --- .travis.yml | 12 ++++++------ phpunit_sqlite.xml => phpunit.xml | 5 ----- phpunit_mysql.xml | 23 ----------------------- phpunit_pgsql.xml | 23 ----------------------- 4 files changed, 6 insertions(+), 57 deletions(-) rename phpunit_sqlite.xml => phpunit.xml (81%) delete mode 100644 phpunit_mysql.xml delete mode 100644 phpunit_pgsql.xml diff --git a/.travis.yml b/.travis.yml index fa0c708..a58d17f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,21 +15,21 @@ php: # optionally specify a list of environments, for example to test different RDBMS env: - - SPOT_DB=mysql - - SPOT_DB=pgsql - - SPOT_DB=sqlite + - SPOT_DB_TYPE=mysql SPOT_DB_DSN=mysql://root@localhost/spot_test + - SPOT_DB_TYPE=pgsql SPOT_DB_DSN=pgsql://postgres@localhost/spot_test" + - SPOT_DB_TYPE=sqlite SPOT_DB_DSN=sqlite::memory install: - composer install # execute any number of scripts before the test run, custom env's are available as variables before_script: - - if [[ "$SPOT_DB" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS spot_test;" -uroot; fi - - if [[ "$SPOT_DB" == "pgsql" ]]; then psql -c 'create database spot_test;' -U postgres; fi + - if [[ "$SPOT_DB_TYPE" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS spot_test;" -uroot; fi + - if [[ "$SPOT_DB_TYPE" == "pgsql" ]]; then psql -c 'create database spot_test;' -U postgres; fi # omitting "script:" will default to phpunit # use the $SPOT_DB env variable to determine the phpunit.xml to use -script: phpunit --configuration phpunit_$SPOT_DB.xml --coverage-text +script: phpunit --configuration phpunit.xml --coverage-text # configure notifications (email, IRC, campfire etc) #notifications: diff --git a/phpunit_sqlite.xml b/phpunit.xml similarity index 81% rename from phpunit_sqlite.xml rename to phpunit.xml index 0e52309..0905bf8 100644 --- a/phpunit_sqlite.xml +++ b/phpunit.xml @@ -10,11 +10,6 @@ syntaxCheck="false" bootstrap="./tests/init.php" > - - - - - ./tests/SpotTest diff --git a/phpunit_mysql.xml b/phpunit_mysql.xml deleted file mode 100644 index 4d3a5fd..0000000 --- a/phpunit_mysql.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - ./tests/SpotTest - - - diff --git a/phpunit_pgsql.xml b/phpunit_pgsql.xml deleted file mode 100644 index 7f0484f..0000000 --- a/phpunit_pgsql.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - ./tests/SpotTest - - -