summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_mysql/tests')
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql___construct.phpt7
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt7
-rw-r--r--ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt3
3 files changed, 10 insertions, 7 deletions
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt
index 0cabfe6aa3..2a890c963d 100644
--- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt
@@ -28,8 +28,11 @@ MySQLPDOTest::skip();
try {
- if (NULL !== ($db = @new PDO()))
- printf("[001] Too few parameters\n");
+ try {
+ if (NULL !== ($db = @new PDO()))
+ printf("[001] Too few parameters\n");
+ } catch (Exception $ex) {
+ }
print tryandcatch(2, '$db = new PDO(chr(0));');
print tryandcatch(3, '$db = new PDO("a" . chr(0) . "b");');
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt
index 8cd028fc53..5166958d24 100644
--- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt
@@ -67,8 +67,11 @@ MySQLPDOTest::skip();
PDO::MYSQL_ATTR_INIT_COMMAND => '',
);
- if (NULL !== ($db = @new PDO($dsn, $user, $pass, 'wrong type')))
- printf("[001] Expecting NULL got %s/%s\n", gettype($db), $db);
+ try {
+ if (NULL !== ($db = @new PDO($dsn, $user, $pass, 'wrong type')))
+ printf("[001] Expecting NULL got %s/%s\n", gettype($db), $db);
+ } catch (Exception $e) {
+ }
if (!is_object($db = new PDO($dsn, $user, $pass, array())))
printf("[002] Expecting object got %s/%s¸\n", gettype($db), $db);
diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
index 7e92ff2e9a..87a69125bb 100644
--- a/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
+++ b/ext/pdo_mysql/tests/pdo_mysql___construct_uri.phpt
@@ -68,9 +68,6 @@ MySQLPDOTest::skip();
print "done!";
?>
--EXPECTF--
-Warning: PDO::__construct(%s
[002] URI=uri:file:%spdomuri.tst, DSN=mysql%sdbname=%s, File=%spdomuri.tst (%d bytes, 'mysql%sdbname=%s'), invalid data source URI
-
-Warning: PDO::__construct(%s
[003] URI=uri:file:%spdomuri.tst, DSN=mysql%sdbname=%s, File=%spdomuri.tst (%d bytes, 'mysql%sdbname=letshopeinvalid%s'), chr(0) test, invalid data source URI
done!