Skip to content

Commit c0d99fd

Browse files
committed
Apply pgsql notice test fixes to PHP-5.5
1 parent 592677d commit c0d99fd

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

ext/pgsql/tests/09notice.phpt

+5
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ $db = pg_connect($conn_str);
2020

2121
_set_lc_messages();
2222

23+
$res = pg_query($db, 'SET client_min_messages TO NOTICE;');
24+
var_dump($res);
25+
2326
pg_query($db, "BEGIN;");
2427
pg_query($db, "BEGIN;");
2528

@@ -33,6 +36,8 @@ echo "pg_last_notice() is Ok\n";
3336

3437
?>
3538
--EXPECTF--
39+
resource(%d) of type (pgsql result)
40+
3641
Notice: pg_query(): %s already a transaction in progress in %s on line %d
3742
%s already a transaction in progress
3843
pg_last_notice() is Ok

ext/pgsql/tests/80_bug32223.phpt

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ begin
3737
end;
3838
' LANGUAGE plpgsql;");
3939

40-
40+
$res = pg_query($dbh, 'SET client_min_messages TO NOTICE;');
41+
var_dump($res);
4142
$res = pg_query($dbh, 'SELECT test_notice()');
43+
var_dump($res);
4244
$row = pg_fetch_row($res, 0);
4345
var_dump($row);
4446
pg_free_result($res);
@@ -52,6 +54,8 @@ pg_close($dbh);
5254
?>
5355
===DONE===
5456
--EXPECTF--
57+
resource(%d) of type (pgsql result)
58+
resource(%d) of type (pgsql result)
5559
array(1) {
5660
[0]=>
5761
string(1) "f"

ext/pgsql/tests/80_bug32223b.phpt

+5-1
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,13 @@ begin
3737
end;
3838
' LANGUAGE plpgsql;");
3939

40+
$res = pg_query(dbh, 'SET client_min_messages TO NOTICE;');
41+
var_dump($res);
42+
4043
function tester() {
4144
$res = pg_query(dbh, 'SELECT test_notice()');
4245
$row = pg_fetch_row($res, 0);
43-
var_dump($row);
46+
var_dump($row);
4447
pg_free_result($res);
4548
if ($row[0] == 'f')
4649
{
@@ -54,6 +57,7 @@ pg_close(dbh);
5457
?>
5558
===DONE===
5659
--EXPECTF--
60+
resource(%d) of type (pgsql result)
5761
array(1) {
5862
[0]=>
5963
string(1) "f"

0 commit comments

Comments
 (0)