From: Christopher Jones Date: Wed, 1 Aug 2007 15:18:37 +0000 (+0000) Subject: MFH: New test for error handling X-Git-Tag: php-5.2.4RC1~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e942c16f7cbc7075b7cb868a509dec7b1e2cb850;p=php MFH: New test for error handling --- diff --git a/ext/oci8/tests/parse_error.phpt b/ext/oci8/tests/parse_error.phpt new file mode 100644 index 0000000000..8100e31706 --- /dev/null +++ b/ext/oci8/tests/parse_error.phpt @@ -0,0 +1,142 @@ +--TEST-- +Test error handling when persistent connection is passed to oci_error() +--SKIPIF-- + +--FILE-- + +--EXPECTF-- +Normal connection: Parse error +array(4) { + ["code"]=> + int(1756) + ["message"]=> + string(48) "ORA-01756: quoted string not properly terminated" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +New connection: Parse error +array(4) { + ["code"]=> + int(1756) + ["message"]=> + string(48) "ORA-01756: quoted string not properly terminated" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +Persistent connection: Parse error +array(4) { + ["code"]=> + int(1756) + ["message"]=> + string(48) "ORA-01756: quoted string not properly terminated" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +No connection: error: bool(false) +Normal connection (take #2): Parse error: ORA-01756: quoted string not properly terminated +New connection (take #2): Parse error: ORA-01756: quoted string not properly terminated +Persistent connection (take #2): Parse error: ORA-01756: quoted string not properly terminated +Normal connection: New Collection error: OCI-22303: type ""."ABC" not found +New connection (take #3): Parse error: ORA-01756: quoted string not properly terminated +Persistent connection (take #3): Parse error: ORA-01756: quoted string not properly terminated +Done