--- embedaddon/php/ext/pdo/tests/pdo_test.inc 2012/05/29 12:34:40 1.1.1.2 +++ embedaddon/php/ext/pdo/tests/pdo_test.inc 2013/07/22 01:31:55 1.1.1.3 @@ -66,13 +66,19 @@ class PDOTest { } static function test_factory($file) { - $data = file_get_contents($file); - $data = preg_replace('/^.*--REDIRECTTEST--/s', '', $data); - $config = eval($data); + $config = self::get_config($file); foreach ($config['ENV'] as $k => $v) { putenv("$k=$v"); } return self::factory(); + } + + static function get_config($file) { + $data = file_get_contents($file); + $data = preg_replace('/^.*--REDIRECTTEST--/s', '', $data); + $config = eval($data); + + return $config; } } ?>