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