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