summaryrefslogtreecommitdiff
path: root/ext/pdo/tests/pdo_test.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo/tests/pdo_test.inc')
-rw-r--r--ext/pdo/tests/pdo_test.inc12
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;
+ }
}
?>