]> granicus.if.org Git - php/commitdiff
Add notice message test
authorYasuo Ohgaki <yohgaki@php.net>
Fri, 5 Apr 2002 06:30:18 +0000 (06:30 +0000)
committerYasuo Ohgaki <yohgaki@php.net>
Fri, 5 Apr 2002 06:30:18 +0000 (06:30 +0000)
# Need to figure out why estrduped string is not null terminated

ext/pgsql/tests/09notice.phpt [new file with mode: 0644]
ext/pgsql/tests/notice.inc [new file with mode: 0644]

diff --git a/ext/pgsql/tests/09notice.phpt b/ext/pgsql/tests/09notice.phpt
new file mode 100644 (file)
index 0000000..f2a6678
--- /dev/null
@@ -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 (file)
index 0000000..7764d45
--- /dev/null
@@ -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";
+
+?>