From e942c16f7cbc7075b7cb868a509dec7b1e2cb850 Mon Sep 17 00:00:00 2001 From: Christopher Jones Date: Wed, 1 Aug 2007 15:18:37 +0000 Subject: [PATCH] MFH: New test for error handling --- ext/oci8/tests/parse_error.phpt | 142 ++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 ext/oci8/tests/parse_error.phpt 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 -- 2.50.1