1===================== 2 Horde/Db Test Suite 3===================== 4 5:Authors: Chuck Hagenbuch 6:Authors: Jan Schneider 7:Contact: dev@lists.horde.org 8 9.. contents:: Contents 10.. section-numbering:: 11 12Defining adapters 13================= 14 15As long as PHP has the PDO SQLite driver (which is enabled by default), the 16SQLite tests will always be run. This is possible using the sqlite:memory 17database; no file access or permissions are required. 18 19For the other adapters, the Horde_Db test suite looks for the configuration 20file conf.php, with an example configuration found at the conf.php.dist file, 21or for environment variables named DB_ADAPTER_$driverName_TEST_CONFIG. For the 22MySQLi driver, that would be DB_ADAPTER_MYSQLI_TEST_CONFIG. For the PDO 23PostgreSQL driver, that would be DB_ADAPTER_PDO_PGSQL_TEST_CONFIG, and so 24on. The value of the environment variable is a JSON string with the 25configuration array for the adapter. Here is an example for setting up a test 26DSN for the MySQL test database on localhost, connecting as the user horde_db 27with no password: 28 29{"username":"horde_db","dbname":"test","host":"localhost"} 30 31When running the test suite, any adapter for which a DSN is not found, or for 32which connecting to the defined DSN fails, a single instance of 33Horde_Db_Adapter_MissingTest will be included in the test suite run, with 34details on why the adapter was skipped. 35