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