summaryrefslogtreecommitdiff
path: root/ext/pgsql/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-04-10 12:22:34 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-04-10 12:22:34 +0200
commit6615b9c287963730fcc6fdf0f49d2597154e40f9 (patch)
tree87941209cf200339814bc056fac1cfb924d4ef94 /ext/pgsql/tests
parented1df9d135422bbb44fcd291ad7954358a6f87ed (diff)
parentc7a86a38a3f657ab81163ac794450fc7ada2ba3c (diff)
downloadphp-git-6615b9c287963730fcc6fdf0f49d2597154e40f9.tar.gz
Merge branch 'PHP-7.2' into PHP-7.3
Diffstat (limited to 'ext/pgsql/tests')
-rw-r--r--ext/pgsql/tests/connect_after_close.phpt19
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/pgsql/tests/connect_after_close.phpt b/ext/pgsql/tests/connect_after_close.phpt
new file mode 100644
index 0000000000..65f954570b
--- /dev/null
+++ b/ext/pgsql/tests/connect_after_close.phpt
@@ -0,0 +1,19 @@
+--TEST--
+Reopen connection after it was closed
+--SKIPIF--
+<?php include("skipif.inc"); ?>
+--FILE--
+<?php
+include('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());
+?>
+--EXPECT--
+bool(true)
+bool(true)