Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testconf.php.dist for more flexible local cross db tests #441

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions tests/testconf.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

# example testconf.php for your local testings
# This testconf.php.dist is a fallback that can be used by ADODB tests for testing if real test databases not configured yet.

# Using their own testconf.php allows testers testing the adodb tests with their custom local test environments easier.

# sqlite3 :memory: requires no database file and db destroyed when connection closes
# So we can use this always as long PHP has the sqlite3 included.
# param1 .. param4 are for the connect() of ADODB, see http://adodb.org/dokuwiki/doku.php?id=v5:database:connection_matrix
$testdbs[]=array('type'=>'sqlite3', 'param1'=>':memory:', 'param2'=>null, 'param3'=>null, 'param4'=>null);

# more examples as inspiration for local testing with testconf.php
#$testdbs[]=array('type'=>'sqlite3', 'param1'=>'_adodbtest_sqlite3.db', 'param2'=>null, 'param3'=>null, 'param4'=>null);
#$testdbs[]=array('type'=>'mysqli', 'param1'=>'localhost', 'param2'=>'root', 'param3'=>'', 'param4'=>'adodbtest');
#$testdbs[]=array('type'=>'postgres','param1'=>'localhost', 'param2'=>'postgres','param3'=>'', 'param4'=>'adodbtest');