diff options
| author | Antony Dovgal <tony2001@php.net> | 2007-06-28 17:26:54 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2007-06-28 17:26:54 +0000 |
| commit | dd44c6a09387ddf4e0bda6df9a8736e7f137c6d1 (patch) | |
| tree | 3023b3fd913aaa86495cdc3b395fd421b35886e1 /ext/oci8 | |
| parent | 37e0738f3a80b738cabf90ab6fd660c15628cd10 (diff) | |
| download | php-git-dd44c6a09387ddf4e0bda6df9a8736e7f137c6d1.tar.gz | |
add env vars for test settings (like in PDO)
Diffstat (limited to 'ext/oci8')
| -rw-r--r-- | ext/oci8/tests/details.inc | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc index 6cf13ac72c..bfd9f309b7 100644 --- a/ext/oci8/tests/details.inc +++ b/ext/oci8/tests/details.inc @@ -1,16 +1,25 @@ <?php -/* -* Please, change user, password and dbase to match your configuration. -* -* */ +/* + * Please change $user, $password and $dbase to match your configuration. + * Set $oracle_on_localhost to TRUE if the Oracle Database is installed on your localhost. + */ -$user = "system"; -$password = "system"; -$dbase = "oracle"; - -/* Set this variable to TRUE if Oracle is installed @ localhost */ - -$oracle_on_localhost = FALSE; +if (false !== getenv('PHP_OCI8_TEST_DB')) { + $user = getenv('PHP_OCI8_TEST_USER'); // Database username for tests + $password = getenv('PHP_OCI8_TEST_PASS'); // Password for $user + $dbase = getenv('PHP_OCI8_TEST_DB'); // Database connection string + $oracle_on_localhost = getenv('PHP_OCI8_TEST_DB_ON_LOCALHOST'); + if (false !== $oracle_on_localhost && 0 == strcasecmp($oracle_on_localhost,'TRUE')) { + $oracle_on_localhost = TRUE; + } else { + $oracle_on_localhost = FALSE; + } +} else { + $user = "system"; + $password = "system"; + $dbase = "oracle"; + $oracle_on_localhost = FALSE; +} ?> |
