Annotation of embedaddon/php/ext/pgsql/tests/09notice.phpt, revision 1.1.1.2
1.1 misho 1: --TEST--
2: PostgreSQL notice function
3: --SKIPIF--
4: <?php
5:
6: include("skipif.inc");
7:
8: _skip_lc_messages();
9:
10: ?>
11: --INI--
12: pgsql.log_notice=1
1.1.1.2 ! misho 13: pgsql.ignore_notice=0
1.1 misho 14: --FILE--
15: <?php
16: include 'config.inc';
17: include 'lcmess.inc';
18:
19: $db = pg_connect($conn_str);
20:
21: _set_lc_messages();
22:
23: pg_query($db, "BEGIN;");
24: pg_query($db, "BEGIN;");
25:
26: $msg = pg_last_notice($db);
27: if ($msg === FALSE) {
28: echo "Cannot find notice message in hash\n";
29: var_dump($msg);
30: }
31: echo $msg."\n";
32: echo "pg_last_notice() is Ok\n";
33:
34: ?>
35: --EXPECTF--
36: Notice: pg_query(): %s already a transaction in progress in %s on line %d
37: %s already a transaction in progress
38: pg_last_notice() is Ok
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>