common.phpt 750 B

1234567891011121314151617181920212223242526
  1. --TEST--
  2. Postgres
  3. --SKIPIF--
  4. <?php # vim:ft=php
  5. if (!extension_loaded('pdo_pgsql')) print 'skip'; ?>
  6. --REDIRECTTEST--
  7. # magic auto-configuration
  8. # Also update config.inc if you make changes here...
  9. $config = array(
  10. 'TESTS' => __DIR__ . '/ext/pdo/tests'
  11. );
  12. if (false !== getenv('PDO_PGSQL_TEST_DSN')) {
  13. # user set them from their shell
  14. $config['ENV']['PDOTEST_DSN'] = getenv('PDO_PGSQL_TEST_DSN');
  15. if (false !== getenv('PDO_PGSQL_TEST_ATTR')) {
  16. $config['ENV']['PDOTEST_ATTR'] = getenv('PDO_PGSQL_TEST_ATTR');
  17. }
  18. } else {
  19. $config['ENV']['PDOTEST_DSN'] = 'pgsql:host=localhost port=5432 dbname=test user=postgres password=postgres';
  20. $config['ENV']['PDOTEST_USER'] = 'postgres';
  21. $config['ENV']['PDOTEST_PASS'] = 'postgres';
  22. }
  23. return $config;