[prev in list] [next in list] [prev in thread] [next in thread]
List: php-cvs
Subject: [PHP-CVS] =?utf-8?q?svn:_/php/php-src/trunk/ext/pdo=5Fdblib/tests/_bug=5F38955.phpt_bug=5F45876.phpt
From: Stanley_Sufficool <ssufficool () php ! net>
Date: 2010-06-30 3:16:04
Message-ID: svn-ssufficool-1277867764-300872-429988454 () svn ! php ! net
[Download RAW message or body]
ssufficool Wed, 30 Jun 2010 03:16:04 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=300872
Log:
pdo_dblib - improve test skip messages
Changed paths:
U php/php-src/trunk/ext/pdo_dblib/tests/bug_38955.phpt
U php/php-src/trunk/ext/pdo_dblib/tests/bug_45876.phpt
U php/php-src/trunk/ext/pdo_dblib/tests/bug_47588.phpt
U php/php-src/trunk/ext/pdo_dblib/tests/bug_50755.phpt
U php/php-src/trunk/ext/pdo_dblib/tests/config.inc
Modified: php/php-src/trunk/ext/pdo_dblib/tests/bug_38955.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_dblib/tests/bug_38955.phpt 2010-06-30 02:45:10 UTC (rev \
300871)
+++ php/php-src/trunk/ext/pdo_dblib/tests/bug_38955.phpt 2010-06-30 03:16:04 UTC (rev \
300872) @@ -4,18 +4,10 @@
<?php
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
require dirname(__FILE__) . '/config.inc';
-try {
- $db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-} catch (PDOException $e) {
- die('skip ' . $e->getMessage());
-}
?>
--FILE--
<?php
require dirname(__FILE__) . '/config.inc';
-$db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
/*We see these rows */
$db->query("CREATE table php_test(val int)");
Modified: php/php-src/trunk/ext/pdo_dblib/tests/bug_45876.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_dblib/tests/bug_45876.phpt 2010-06-30 02:45:10 UTC (rev \
300871)
+++ php/php-src/trunk/ext/pdo_dblib/tests/bug_45876.phpt 2010-06-30 03:16:04 UTC (rev \
300872) @@ -4,18 +4,10 @@
<?php
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
require dirname(__FILE__) . '/config.inc';
-try {
- $db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-} catch (PDOException $e) {
- die('skip ' . $e->getMessage());
-}
?>
--FILE--
<?php
require dirname(__FILE__) . '/config.inc';
-$db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
$stmt = $db->prepare("select ic1.* from information_schema.columns ic1");
$stmt->execute();
Modified: php/php-src/trunk/ext/pdo_dblib/tests/bug_47588.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_dblib/tests/bug_47588.phpt 2010-06-30 02:45:10 UTC (rev \
300871)
+++ php/php-src/trunk/ext/pdo_dblib/tests/bug_47588.phpt 2010-06-30 03:16:04 UTC (rev \
300872) @@ -4,19 +4,10 @@
<?php
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
require dirname(__FILE__) . '/config.inc';
-try {
- $db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-} catch (PDOException $e) {
- die('skip ' . $e->getMessage());
-}
-
?>
--FILE--
<?php
require dirname(__FILE__) . '/config.inc';
-$db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
$db->query('CREATE TABLE "Test Table" ("My Field" int, "Another Field" varchar(32) \
not null default \'test_string\')'); $db->query('INSERT INTO "Test Table" ("My \
Field") values(1)');
Modified: php/php-src/trunk/ext/pdo_dblib/tests/bug_50755.phpt
===================================================================
--- php/php-src/trunk/ext/pdo_dblib/tests/bug_50755.phpt 2010-06-30 02:45:10 UTC (rev \
300871)
+++ php/php-src/trunk/ext/pdo_dblib/tests/bug_50755.phpt 2010-06-30 03:16:04 UTC (rev \
300872) @@ -4,18 +4,10 @@
<?php
if (!extension_loaded('pdo_dblib')) die('skip not loaded');
require dirname(__FILE__) . '/config.inc';
-try {
- $db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-} catch (PDOException $e) {
- die('skip ' . $e->getMessage());
-}
?>
--FILE--
<?php
require dirname(__FILE__) . '/config.inc';
-$db = new PDO( getenv('PDOTEST_DSN'), getenv('PDOTEST_USER'), \
getenv('PDOTEST_PASS'));
-$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
-$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
/* This should be sufficient to overflow any buffers */
$stmt = $db->prepare("select *
Modified: php/php-src/trunk/ext/pdo_dblib/tests/config.inc
===================================================================
--- php/php-src/trunk/ext/pdo_dblib/tests/config.inc 2010-06-30 02:45:10 UTC (rev \
300871)
+++ php/php-src/trunk/ext/pdo_dblib/tests/config.inc 2010-06-30 03:16:04 UTC (rev \
300872) @@ -1,20 +1,26 @@
<?php
if (false !== getenv('PDO_DBLIB_TEST_DSN'))
- $config['ENV']['PDOTEST_DSN'] = getenv('PDO_DBLIB_TEST_DSN');
+ $dsn = getenv('PDO_DBLIB_TEST_DSN');
else
- $config['ENV']['PDOTEST_DSN'] = 'dblib:host=localhost dbname=test';
+ $dsn = 'dblib:host=localhost;dbname=test';
if (false !== getenv('PDO_DBLIB_TEST_USER'))
- $config['ENV']['PDOTEST_USER'] = getenv('PDO_DBLIB_TEST_USER');
+ $user = getenv('PDO_DBLIB_TEST_USER');
+else
+ $user = 'php';
+
if (false !== getenv('PDO_DBLIB_TEST_PASS'))
- $config['ENV']['PDOTEST_PASS'] = getenv('PDO_DBLIB_TEST_PASS');
+ $pass = getenv('PDO_DBLIB_TEST_PASS');
+else
+ $pass = 'password';
-if (false !== getenv('PDO_DBLIB_TEST_ATTR'))
- $config['ENV']['PDOTEST_ATTR'] = getenv('PDO_DBLIB_TEST_ATTR');
-
-foreach ($config['ENV'] as $k => $v) {
- putenv("$k=$v");
+try {
+ $db = new PDO($dsn, $user, $pass);
+ $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
+} catch (PDOException $e) {
+ die('skip ' . $e->getMessage());
}
?>
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic