mirror of
https://github.com/danog/ext-pq.git
synced 2024-12-02 09:18:02 +01:00
35 lines
466 B
PHP
35 lines
466 B
PHP
--TEST--
|
|
persistent handles
|
|
--SKIPIF--
|
|
<?php include "_skipif.inc"; ?>
|
|
--FILE--
|
|
<?php
|
|
echo "Test\n";
|
|
|
|
include "_setup.inc";
|
|
|
|
for ($i=0; $i<100; ++$i) {
|
|
$c = new pq\Connection(PQ_DSN, pq\Connection::PERSISTENT);
|
|
|
|
if ($i % 2) {
|
|
$t = new pq\Transaction($c);
|
|
}
|
|
|
|
$c->exec("");
|
|
}
|
|
var_dump(raphf\stat_persistent_handles()->{"pq\\Connection"});
|
|
?>
|
|
DONE
|
|
--EXPECTF--
|
|
Test
|
|
array(1) {
|
|
["%s"]=>
|
|
array(2) {
|
|
["used"]=>
|
|
int(1)
|
|
["free"]=>
|
|
int(2)
|
|
}
|
|
}
|
|
DONE
|