Apply pgsql notice test fixes to PHP-5.5
authorNikita Popov <nikic@php.net>
Thu, 22 Aug 2013 12:02:55 +0000 (14:02 +0200)
committerNikita Popov <nikic@php.net>
Thu, 22 Aug 2013 12:02:55 +0000 (14:02 +0200)
ext/pgsql/tests/09notice.phpt
ext/pgsql/tests/80_bug32223.phpt
ext/pgsql/tests/80_bug32223b.phpt

index 67ef262fcade746bdf3e512f628ca863a42fffa9..db671016e3b559341b50c6cc11a7a34fbae153e9 100644 (file)
@@ -20,6 +20,9 @@ $db = pg_connect($conn_str);
 
 _set_lc_messages();
 
+$res = pg_query($db, 'SET client_min_messages TO NOTICE;'); 
+var_dump($res);
+
 pg_query($db, "BEGIN;");
 pg_query($db, "BEGIN;");
 
@@ -33,6 +36,8 @@ echo "pg_last_notice() is Ok\n";
 
 ?>
 --EXPECTF--
+resource(%d) of type (pgsql result)
+
 Notice: pg_query(): %s already a transaction in progress in %s on line %d
 %s already a transaction in progress
 pg_last_notice() is Ok
index cad5fb3a123da6576b6026c1b01b8eb5bb54b963..b9bbbf86edf158867eaed5864027aeaec5e5ec6d 100644 (file)
@@ -37,8 +37,10 @@ begin
 end;
 ' LANGUAGE plpgsql;");
 
-
+$res = pg_query($dbh, 'SET client_min_messages TO NOTICE;');
+var_dump($res);
 $res = pg_query($dbh, 'SELECT test_notice()');
+var_dump($res);
 $row = pg_fetch_row($res, 0);
 var_dump($row);
 pg_free_result($res);
@@ -52,6 +54,8 @@ pg_close($dbh);
 ?>
 ===DONE===
 --EXPECTF--
+resource(%d) of type (pgsql result)
+resource(%d) of type (pgsql result)
 array(1) {
   [0]=>
   string(1) "f"
index e79685c43dabb7bfc83661dd813e06f1c0ee8be4..418ccfc9aebaa2e76d2f139aafbf70d7d6132882 100644 (file)
@@ -37,10 +37,13 @@ begin
 end;
 ' LANGUAGE plpgsql;");
 
+$res = pg_query(dbh, 'SET client_min_messages TO NOTICE;');
+var_dump($res);
+
 function tester() {
         $res = pg_query(dbh, 'SELECT test_notice()');
         $row = pg_fetch_row($res, 0);
-               var_dump($row);
+        var_dump($row);
         pg_free_result($res);
         if ($row[0] == 'f')
         {
@@ -54,6 +57,7 @@ pg_close(dbh);
 ?>
 ===DONE===
 --EXPECTF--
+resource(%d) of type (pgsql result)
 array(1) {
   [0]=>
   string(1) "f"