1
0
mirror of https://github.com/danog/ext-pq.git synced 2024-12-02 09:18:02 +01:00
ext-pq/tests/cancel001.phpt
2013-01-30 17:21:38 +01:00

40 lines
526 B
PHP

--TEST--
cancel
--SKIPIF--
<?php include "_skipif.inc"; ?>
--FILE--
<?php
echo "Test\n";
include "_setup.inc";
$c = new pq\Connection(PQ_DSN);
$x = new pq\Cancel($c);
$c->execAsync("SELECT pg_sleep(2)");
$x->cancel();
var_dump($c->getResult());
?>
DONE
--EXPECTF--
Test
object(pq\Result)#%d (6) {
["status"]=>
int(7)
["errorMessage"]=>
string(47) "ERROR: canceling statement due to user request"
["numRows"]=>
int(0)
["numCols"]=>
int(0)
["affectedRows"]=>
int(0)
["fetchType"]=>
int(0)
}
DONE