com php-src: Fix tests: ext/pdo_pgsql/tests/bug6247 9.phpt ext/pdo_pgsql/tests/bug69362.phpt
| From: | Anatol Belski | Date: | Thu, 04 Jan 2018 15:08:41 +0000 |
| Subject: | com php-src: Fix tests: ext/pdo_pgsql/tests/bug6247 9.phpt ext/pdo_pgsql/tests/bug69362.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-100795@lists.php.net to get a copy of this message | ||
Commit: 1448f0912f088c9da7270b94875225b6cc4993e6
Author: Anatol Belski <ab@php.net> Thu, 4 Jan 2018 16:08:41 +0100
Parents: 904e0d72127ad029373dd6a6d6495e84ab7fcd4a
Branches: PHP-7.1 PHP-7.2 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1448f0912f088c9da7270b94875225b6cc4993e6
Log:
Fix tests
Changed paths:
M ext/pdo_pgsql/tests/bug62479.phpt
M ext/pdo_pgsql/tests/bug69362.phpt
Diff:
diff --git a/ext/pdo_pgsql/tests/bug62479.phpt b/ext/pdo_pgsql/tests/bug62479.phpt
index 9133218..efe4ece 100644
--- a/ext/pdo_pgsql/tests/bug62479.phpt
+++ b/ext/pdo_pgsql/tests/bug62479.phpt
@@ -37,6 +37,7 @@ $db->exec("DROP USER $user");
?>
--FILE--
<?php
+require dirname(__FILE__) . '/config.inc';
require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc';
$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
@@ -49,7 +50,7 @@ $testQuery = 'SELECT 1 as verification';
// Create temp user with space in password
$sql = sprintf($template, 'my password');
$pdo->query($sql);
-$testConn = new PDO($conf['ENV']['PDOTEST_DSN'], $user, "my
password");
+$testConn = new PDO($config['ENV']['PDOTEST_DSN'], $user, "my
password");
$result = $testConn->query($testQuery)->fetch();
$check = $result[0];
var_dump($check);
@@ -61,7 +62,7 @@ $pdo->query($dropUser);
$sql = sprintf($template, "my pass''word");
$pdo->query($sql);
-$testConn = new PDO($conf['ENV']['PDOTEST_DSN'], $user, "my
pass'word");
+$testConn = new PDO($config['ENV']['PDOTEST_DSN'], $user, "my
pass'word");
$result = $testConn->query($testQuery)->fetch();
$check = $result[0];
var_dump($check);
diff --git a/ext/pdo_pgsql/tests/bug69362.phpt b/ext/pdo_pgsql/tests/bug69362.phpt
index 33212a8..e986af8 100644
--- a/ext/pdo_pgsql/tests/bug69362.phpt
+++ b/ext/pdo_pgsql/tests/bug69362.phpt
@@ -37,6 +37,7 @@ $db->exec("DROP USER $user");
?>
--FILE--
<?php
+require dirname(__FILE__) . '/config.inc';
require dirname(__FILE__) . '/../../.../ext/pdo/tests/pdo_test.inc';
$pdo = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt');
$pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
@@ -49,7 +50,7 @@ $testQuery = 'SELECT 1 as verification';
// Create temp user with leading single quote
$sql = sprintf($template, "''mypassword");
$pdo->query($sql);
-$testConn = new PDO($conf['ENV']['PDOTEST_DSN'], $user,
"'mypassword");
+$testConn = new PDO($config['ENV']['PDOTEST_DSN'], $user,
"'mypassword");
$result = $testConn->query($testQuery)->fetch();
$check = $result[0];
var_dump($check);