xref: /php-src/ext/pdo_mysql/tests/common.phpt (revision 39131219)
1--TEST--
2MySQL
3--EXTENSIONS--
4pdo
5pdo_mysql
6--REDIRECTTEST--
7# magic auto-configuration
8
9$config = array(
10	'TESTS' => __DIR__.'/ext/pdo/tests'
11);
12
13if (false !== getenv('PDO_MYSQL_TEST_DSN')) {
14	# user set them from their shell
15	$config['ENV']['PDOTEST_DSN'] = getenv('PDO_MYSQL_TEST_DSN');
16	$config['ENV']['PDOTEST_USER'] = getenv('PDO_MYSQL_TEST_USER');
17	$config['ENV']['PDOTEST_PASS'] = getenv('PDO_MYSQL_TEST_PASS');
18	if (false !== getenv('PDO_MYSQL_TEST_ATTR')) {
19		$config['ENV']['PDOTEST_ATTR'] = getenv('PDO_MYSQL_TEST_ATTR');
20	}
21} else {
22	$config['ENV']['PDOTEST_DSN'] = 'mysql:host=localhost;dbname=test';
23	$config['ENV']['PDOTEST_USER'] = 'root';
24	$config['ENV']['PDOTEST_PASS'] = '';
25}
26
27return $config;
28