Annotation of embedaddon/php/ext/oci8/tests/error.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: oci_error() error message for parsing error
3: --SKIPIF--
4: <?php
5: $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs: different error messages from TimesTen
6: require(dirname(__FILE__).'/skipif.inc');
7: ?>
8: --FILE--
9: <?php
10:
11: require dirname(__FILE__)."/connect.inc";
12:
13: if (!empty($dbase)) {
14: var_dump(oci_connect($user, $password, $dbase));
15: }
16: else {
17: var_dump(oci_connect($user, $password));
18: }
19:
20: var_dump($s = oci_parse($c, "WRONG SYNTAX"));
21: var_dump(oci_execute($s));
22: var_dump(oci_error($s));
23:
24: echo "Done\n";
25:
26: ?>
27: --EXPECTF--
28: resource(%s) of type (oci8 connection)
29: resource(%s) of type (oci8 statement)
30:
31: Warning: oci_execute(): ORA-00900: %s in %s on line %d
32: bool(false)
33: array(4) {
34: ["code"]=>
35: int(900)
36: ["message"]=>
37: string(%d) "ORA-00900: %s"
38: ["offset"]=>
39: int(0)
40: ["sqltext"]=>
41: string(12) "WRONG SYNTAX"
42: }
43: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>