diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-08-20 08:34:35 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-08-20 08:34:35 +0200 |
commit | 45c0aa447e02c80bd21a23245574231a110cf5a1 (patch) | |
tree | b801de455f164afbf40fbbc995ab9751163eee84 /ext/pdo/tests/pdo_test.inc | |
parent | 3365f28adf90110ca7475df889720fc244820f4b (diff) | |
download | php-45c0aa447e02c80bd21a23245574231a110cf5a1.tar.gz |
Imported Upstream version 5.4.6upstream/5.4.6
Diffstat (limited to 'ext/pdo/tests/pdo_test.inc')
-rw-r--r-- | ext/pdo/tests/pdo_test.inc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/pdo/tests/pdo_test.inc b/ext/pdo/tests/pdo_test.inc index f2e076793..443c8dd82 100644 --- a/ext/pdo/tests/pdo_test.inc +++ b/ext/pdo/tests/pdo_test.inc @@ -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; + } } ?> |