Skip to content

Commit 7810f5f

Browse files
committed
Add convenience helper for running tests against multiple different databases
1 parent decd148 commit 7810f5f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

run-all.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 commit comments

Comments
 (0)