config.inc 570 B

12345678910111213141516
  1. <?php
  2. if (false !== getenv('PDO_PGSQL_TEST_DSN')) {
  3. # user set them from their shell
  4. $config['ENV']['PDOTEST_DSN'] = getenv('PDO_PGSQL_TEST_DSN');
  5. if (false !== getenv('PDO_PGSQL_TEST_ATTR')) {
  6. $config['ENV']['PDOTEST_ATTR'] = getenv('PDO_PGSQL_TEST_ATTR');
  7. }
  8. } else {
  9. $config['ENV']['PDOTEST_DSN'] = 'pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres';
  10. $config['ENV']['PDOTEST_USER'] = 'postgres';
  11. $config['ENV']['PDOTEST_PASS'] = 'postgres';
  12. }
  13. foreach ($config['ENV'] as $k => $v) {
  14. putenv("$k=$v");
  15. }