summaryrefslogtreecommitdiff
path: root/ext/pdo
diff options
context:
space:
mode:
authorMatteo Beccati <mbeccati@php.net>2013-06-02 13:32:48 +0200
committerMatteo Beccati <mbeccati@php.net>2013-06-02 13:32:48 +0200
commita98359b7b95e06f4ad2a3369e20550bdeeb1e0d1 (patch)
tree4be63527dfad49a4738ad72dd913b4d4d73f18c1 /ext/pdo
parentcbf90b1a908d8f5c1799a1e206b968f393ba7d99 (diff)
downloadphp-git-a98359b7b95e06f4ad2a3369e20550bdeeb1e0d1.tar.gz
Improved test portability so that it doesn't fail with pdo_pgsql
Diffstat (limited to 'ext/pdo')
-rw-r--r--ext/pdo/tests/bug61292.phpt9
1 files changed, 8 insertions, 1 deletions
diff --git a/ext/pdo/tests/bug61292.phpt b/ext/pdo/tests/bug61292.phpt
index 2381fd1a23..05b2e9c011 100644
--- a/ext/pdo/tests/bug61292.phpt
+++ b/ext/pdo/tests/bug61292.phpt
@@ -17,8 +17,15 @@ class Database_SQL extends PDO
{
function __construct()
{
+ $dsn = getenv('PDOTEST_DSN');
+ $user = getenv('PDOTEST_USER');
+ $pass = getenv('PDOTEST_PASS');
+
+ if ($user === false) $user = NULL;
+ if ($pass === false) $pass = NULL;
$options = array(PDO::ATTR_PERSISTENT => TRUE);
- parent::__construct(getenv("PDOTEST_DSN"), getenv("PDOTEST_USER"), getenv("PDOTEST_PASS"), $options);
+
+ parent::__construct($dsn, $user, $pass, $options);
}
var $bar = array();