Skip to content

Commit

Permalink
We support conf.php style configuration too.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed May 23, 2016
1 parent b478b02 commit 263f87d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions framework/Db/doc/Horde/Db/README_TESTING
Expand Up @@ -16,13 +16,15 @@ As long as PHP has the PDO SQLite driver (which is enabled by default), the
SQLite tests will always be run. This is possible using the sqlite:memory
database; no file access or permissions are required.

For the other adapters, the Horde_Db test suite looks for environment variables
named DB_ADAPTER_$driverName_TEST_CONFIG. For the MySQLi driver, that would be
DB_ADAPTER_MYSQLI_TEST_CONFIG. For the PDO PostgreSQL driver, that would be
DB_ADAPTER_PDO_PGSQL_TEST_CONFIG, and so on. The value of the environment
variable is a JSON string with the configuration array for the adapter. Here is
an example for setting up a test DSN for the MySQL test database on localhost,
connecting as the user horde_db with no password:
For the other adapters, the Horde_Db test suite looks for the configuration
file conf.php, with an example configuration found at the conf.php.dist file,
or for environment variables named DB_ADAPTER_$driverName_TEST_CONFIG. For the
MySQLi driver, that would be DB_ADAPTER_MYSQLI_TEST_CONFIG. For the PDO
PostgreSQL driver, that would be DB_ADAPTER_PDO_PGSQL_TEST_CONFIG, and so
on. The value of the environment variable is a JSON string with the
configuration array for the adapter. Here is an example for setting up a test
DSN for the MySQL test database on localhost, connecting as the user horde_db
with no password:

{"username":"horde_db","dbname":"test","host":"localhost"}

Expand Down

0 comments on commit 263f87d

Please sign in to comment.