xref: /PHP-8.0/ext/pdo_firebird/tests/common.phpt (revision f6c15e2c)
1--TEST--
2FIREBIRD
3--SKIPIF--
4<?php # vim:ft=php
5if (!extension_loaded('pdo_firebird')) print 'skip'; ?>
6--REDIRECTTEST--
7# magic auto-configuration
8
9$config = array(
10	'ENV' => ['LSAN_OPTIONS' => 'detect_leaks=0'],
11	'TESTS' => 'ext/pdo/tests'
12);
13
14
15if (false !== getenv('PDO_FIREBIRD_TEST_DSN')) {
16	# user set them from their shell
17	$config['ENV']['PDOTEST_DSN'] = getenv('PDO_FIREBIRD_TEST_DSN');
18	$config['ENV']['PDOTEST_USER'] = getenv('PDO_FIREBIRD_TEST_USER');
19	$config['ENV']['PDOTEST_PASS'] = getenv('PDO_FIREBIRD_TEST_PASS');
20	if (false !== getenv('PDO_FIREBIRD_TEST_ATTR')) {
21		$config['ENV']['PDOTEST_ATTR'] = getenv('PDO_FIREBIRD_TEST_ATTR');
22	}
23} else {
24	$config['ENV']['PDOTEST_DSN'] = 'firebird:dbname=/opt/firebird/test.gdb';
25	$config['ENV']['PDOTEST_USER'] = 'SYSDBA';
26	$config['ENV']['PDOTEST_PASS'] = 'password';
27}
28return $config;
29