Author: uwendel
Date: 2007-12-12 18:29:42 +0100 (Wed, 12 Dec 2007)
New Revision: 1167
Modified:
trunk/tests/ext/pdo/pdo_errorcode.phpt
Log:
Again, lets not test driver dependent exec()/prepare() at this place.
Modified: trunk/tests/ext/pdo/pdo_errorcode.phpt
===================================================================
--- trunk/tests/ext/pdo/pdo_errorcode.phpt 2007-12-12 17:21:27 UTC (rev 1166)
+++ trunk/tests/ext/pdo/pdo_errorcode.phpt 2007-12-12 17:29:42 UTC (rev 1167)
@@ -20,10 +20,6 @@
if ('' !== ($tmp = $db->errorCode()))
printf("[002] Expecting empty string got %s/%s\n", $tmp, gettype($tmp));
-$db->exec('THIS IS NO VALID SQL, I HOPE');
-// keep this one var_dump() for future unicode testing and PHP 6
-var_dump($db->errorCode());
-
$db->exec('CREATE TABLE test(id int NOT NULL PRIMARY KEY, val VARCHAR(10), grp
VARCHAR(10))');
if ('00000' !== ($tmp = $db->errorCode()))
printf("[003] CREATE TABLE has failed, test will fail, [%s} [%s]\n",
@@ -44,20 +40,8 @@
$db->errorCode(), implode(' ', $db->errorInfo()));
$stmt->execute();
-$param = 'there is no placehulder to bind';
-$stmt->bindParam(1, $param);
-if ('00000' !== ($tmp = $db->errorCode()))
- printf("[007] Unexpected error code, [%s] %s\n",
- $db->errorCode(), implode(' ', $db->errorInfo()));
-$tmp = $stmt->errorCode();
-if (('00000' == $tmp) || (strlen($tmp) < 5))
- printf("[008] Shouldn't the statement indicate an error after: prepare(<no
placeholder>); execute(); bindParam(<to non existing placeholder>)? [%s] %s\n",
- $stmt->errorCode(), implode(' ', $stmt->errorInfo()));
-
print "done!";
?>
--EXPECTF--
-Warning: PDO::exec(): SQLSTATE[%s]: %s in %s on line %d
-string(5) "%s"
done!
\ No newline at end of file
| Thread |
|---|
| • PHP mysqlnd svn commit: r1167 - trunk/tests/ext/pdo | uwendel | 12 Dec |