summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/pgsql/tests/09notice.phpt11
-rw-r--r--ext/pgsql/tests/notice.inc12
2 files changed, 23 insertions, 0 deletions
diff --git a/ext/pgsql/tests/09notice.phpt b/ext/pgsql/tests/09notice.phpt
new file mode 100644
index 0000000000..f2a6678e28
--- /dev/null
+++ b/ext/pgsql/tests/09notice.phpt
@@ -0,0 +1,11 @@
+--TEST--
+PostgreSQL notice function
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+include("notice.inc");
+?>
+--EXPECT--
+NOTICE: BEGIN: already a transaction in progress
+pg_last_notice() is Ok
diff --git a/ext/pgsql/tests/notice.inc b/ext/pgsql/tests/notice.inc
new file mode 100644
index 0000000000..7764d458ea
--- /dev/null
+++ b/ext/pgsql/tests/notice.inc
@@ -0,0 +1,12 @@
+<?php
+include 'config.inc';
+
+$db = pg_connect($conn_str);
+pg_query($db, "BEGIN;");
+pg_query($db, "BEGIN;");
+
+$msg = pg_last_notice($db);
+echo $msg;
+echo "pg_last_notice() is Ok\n";
+
+?>