From: Stanley Sufficool Date: Wed, 30 Jun 2010 03:16:04 +0000 (+0000) Subject: pdo_dblib - improve test skip messages X-Git-Tag: php-5.4.0alpha1~191^2~1225 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=df60c5063c616f7648badc3ab832be86e43faf93;p=php pdo_dblib - improve test skip messages --- diff --git a/ext/pdo_dblib/tests/bug_38955.phpt b/ext/pdo_dblib/tests/bug_38955.phpt index 95f5f204b4..1954ed460b 100644 --- a/ext/pdo_dblib/tests/bug_38955.phpt +++ b/ext/pdo_dblib/tests/bug_38955.phpt @@ -4,18 +4,10 @@ getMessage()); -} ?> --FILE-- 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)"); diff --git a/ext/pdo_dblib/tests/bug_45876.phpt b/ext/pdo_dblib/tests/bug_45876.phpt index 6b48e5cafb..920905830a 100644 --- a/ext/pdo_dblib/tests/bug_45876.phpt +++ b/ext/pdo_dblib/tests/bug_45876.phpt @@ -4,18 +4,10 @@ PDO_DBLIB: Does not support get column meta getMessage()); -} ?> --FILE-- 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(); diff --git a/ext/pdo_dblib/tests/bug_47588.phpt b/ext/pdo_dblib/tests/bug_47588.phpt index e1835ffefe..d8f424e872 100644 --- a/ext/pdo_dblib/tests/bug_47588.phpt +++ b/ext/pdo_dblib/tests/bug_47588.phpt @@ -4,19 +4,10 @@ PDO_DBLIB: Quoted field names getMessage()); -} - ?> --FILE-- 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)'); diff --git a/ext/pdo_dblib/tests/bug_50755.phpt b/ext/pdo_dblib/tests/bug_50755.phpt index 8073706de6..95d1a8bc70 100644 --- a/ext/pdo_dblib/tests/bug_50755.phpt +++ b/ext/pdo_dblib/tests/bug_50755.phpt @@ -4,18 +4,10 @@ PDO_DBLIB: Out of memory on large recordsets getMessage()); -} ?> --FILE-- 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 * diff --git a/ext/pdo_dblib/tests/config.inc b/ext/pdo_dblib/tests/config.inc index 862d504ec7..5b7b4d4327 100644 --- a/ext/pdo_dblib/tests/config.inc +++ b/ext/pdo_dblib/tests/config.inc @@ -1,20 +1,26 @@ $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()); } ?>