php-src/ext/pgsql/tests/connect_after_close.phpt
KentarouTakeda c15988aab3
ext/pgsql: Refactor tests (#12608)
This makes the tests independent of each other and allows them to be run in parallel.

Co-authored-by: Gina Peter Banyard <girgias@php.net>
2023-11-06 22:36:52 +00:00

26 lines
553 B
PHP

--TEST--
Reopen connection after it was closed
--EXTENSIONS--
pgsql
--SKIPIF--
<?php include("inc/skipif.inc"); ?>
--FILE--
<?php
include('inc/config.inc');
/* Run me under valgrind */
$db1 = pg_connect($conn_str);
unset($db1);
var_dump(pg_close());
$db2 = pg_connect($conn_str);
unset($db2);
var_dump(pg_close());
?>
--EXPECTF--
Deprecated: pg_close(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d
bool(true)
Deprecated: pg_close(): Automatic fetching of PostgreSQL connection is deprecated in %s on line %d
bool(true)