summaryrefslogtreecommitdiff
path: root/ext/pdo_mysql/tests
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2015-03-30 18:53:38 +0300
committerDmitry Stogov <dmitry@zend.com>2015-03-30 18:53:38 +0300
commit1018f462d8bb0a12b238d9d11c141038beaf2a6c (patch)
tree6466aa51c3924c5ed56741e02fa323fcb3e2ece4 /ext/pdo_mysql/tests
parent9155a267adeeb6f442f97892de441e4b6666ce73 (diff)
downloadphp-git-1018f462d8bb0a12b238d9d11c141038beaf2a6c.tar.gz
Patch improvement:
Removed the corresponding core code. Fixed ext/com_dotnet and ext/date. Refactored ext/intl changes. Improved ext/fileinfo and ext/pdo changes. Fixed tests.
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!