Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Add convenience helper for running tests against multiple different d…

…atabases
  • Loading branch information...
commit 7810f5fe6939d57712fbec2ce1bd5d77f98725e6 1 parent decd148
Benjamin Eberlei beberlei authored

Showing 1 changed file with 21 additions and 0 deletions. Show diff stats Hide diff stats

  1. +21 0 run-all.sh
21 run-all.sh
... ... @@ -0,0 +1,21 @@
  1 +#!/bin/bash
  2 +
  3 +# This script is a small convenience wrapper for running the doctrine testsuite against a large bunch of databases.
  4 +# Just create the phpunit.xmls as described in the array below and configure the specific files <php /> section
  5 +# to connect to that database. Just omit a file if you dont have that database and the tests will be skipped.
  6 +
  7 +configs[1]="mysql.phpunit.xml"
  8 +configs[2]='postgres.phpunit.xml'
  9 +configs[3]='sqlite.phpunit.xml'
  10 +configs[4]='oracle.phpunit.xml'
  11 +configs[5]='db2.phpunit.xml'
  12 +configs[6]='pdo-ibm.phpunit.xml'
  13 +configs[7]='sqlsrv.phpunit.xml'
  14 +
  15 +for i in "${configs[@]}"; do
  16 + if [ -f "$i" ];
  17 + then
  18 + echo "RUNNING TESTS WITH CONFIG $i"
  19 + phpunit -c "$i" "$@"
  20 + fi;
  21 +done

0 comments on commit 7810f5f

Please sign in to comment.
Something went wrong with that request. Please try again.