summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2005-06-21 13:42:23 +0000
committerIlia Alshanetsky <iliaa@php.net>2005-06-21 13:42:23 +0000
commitc594f47f76315b1f60654058d2dbd6650a2810bf (patch)
tree7adb7e8a8b10dd9d4653de649d3f53f2dd5f1029
parentf5fb13103f1126f688490472ae6060dc0c183d8e (diff)
downloadphp-git-c594f47f76315b1f60654058d2dbd6650a2810bf.tar.gz
Fixed test skip conditions.
# Same needs to be done to odbc, but it seems access is restricted # for "privileged" folks.
-rwxr-xr-xext/pdo_mysql/tests/prepare.inc7
-rwxr-xr-xext/pdo_oci/tests/prepare.inc7
-rwxr-xr-xext/pdo_pgsql/tests/prepare.inc7
3 files changed, 18 insertions, 3 deletions
diff --git a/ext/pdo_mysql/tests/prepare.inc b/ext/pdo_mysql/tests/prepare.inc
index 7bda793609..4e8987390b 100755
--- a/ext/pdo_mysql/tests/prepare.inc
+++ b/ext/pdo_mysql/tests/prepare.inc
@@ -4,7 +4,12 @@ require_once('connection.inc');
$SQL = array();
-$DB = new pdo($CONNECTION, $USER, $PASSWD);
+try {
+ $DB = new pdo($CONNECTION, $USER, $PASSWD);
+} catch (Exception $tmp) {
+ $DB = NULL;
+ return;
+}
foreach(array('test','classtypes') as $name)
{
diff --git a/ext/pdo_oci/tests/prepare.inc b/ext/pdo_oci/tests/prepare.inc
index f243e5c38b..2f7531a5b5 100755
--- a/ext/pdo_oci/tests/prepare.inc
+++ b/ext/pdo_oci/tests/prepare.inc
@@ -4,7 +4,12 @@ require_once('connection.inc');
$SQL = array();
-$DB = new pdo($CONNECTION, $USER, $PASSWORD);
+try {
+ $DB = new pdo($CONNECTION, $USER, $PASSWORD);
+} catch (Exception $tmp) {
+ $DB = NULL;
+ return;
+}
$DB->query('DROP TABLE test');
$DB->query('DROP TABLE classtypes');
diff --git a/ext/pdo_pgsql/tests/prepare.inc b/ext/pdo_pgsql/tests/prepare.inc
index 6e87485799..5667ac6b43 100755
--- a/ext/pdo_pgsql/tests/prepare.inc
+++ b/ext/pdo_pgsql/tests/prepare.inc
@@ -4,7 +4,12 @@ require_once('connection.inc');
$SQL = array();
-$DB = new pdo($CONNECTION);
+try {
+ $DB = new pdo($CONNECTION);
+} catch (Exception $tmp) {
+ $DB = NULL;
+ return;
+}
foreach(array('test','classtypes') as $name)
{