summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests
diff options
context:
space:
mode:
authorYasuo Ohgaki <yohgaki@php.net>2002-04-05 06:30:18 +0000
committerYasuo Ohgaki <yohgaki@php.net>2002-04-05 06:30:18 +0000
commita9452edac79197c923ac2d6f82c08e6111aed2eb (patch)
tree31600e9bfe5c8919cccd39914948e6bc21903434 /ext/pgsql/tests
parentd84f0e55304ff83c370d2e2481647c054a3b4f74 (diff)
downloadphp-git-a9452edac79197c923ac2d6f82c08e6111aed2eb.tar.gz
Add notice message test
# Need to figure out why estrduped string is not null terminated
Diffstat (limited to 'ext/pgsql/tests')
-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";
+
+?>