xref: /PHP-8.1/ext/oci8/tests/error2.phpt (revision b5a14e6c)
1--TEST--
2Exercise error code for SUCCESS_WITH_INFO
3--EXTENSIONS--
4oci8
5--SKIPIF--
6<?php
7$target_dbs = array('oracledb' => true, 'timesten' => false);  // test runs on these DBs
8require(__DIR__.'/skipif.inc');
9if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
10?>
11--FILE--
12<?php
13
14require(__DIR__.'/connect.inc');
15
16ini_set('error_reporting', E_ALL);
17
18$s = oci_parse($c, "create or replace procedure myproc as begin bogus end;");
19$e = @oci_execute($s);
20if (!$e) {
21    $es = oci_error($s);
22    echo $es['message']."\n";
23}
24
25echo "Done\n";
26
27?>
28--EXPECTF--
29ORA-24344: %s
30Done
31