X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=tests%2Fasync010.phpt;fp=tests%2Fasync010.phpt;h=8ae089e9e381911095b557a78f0d14586182a874;hp=0000000000000000000000000000000000000000;hb=118696aeeb3bed44f1642e62f8697885b7630a90;hpb=3947ff3c0e60cb520dcc11214d12a7851e860844;ds=sidebyside diff --git a/tests/async010.phpt b/tests/async010.phpt new file mode 100644 index 0000000..8ae089e --- /dev/null +++ b/tests/async010.phpt @@ -0,0 +1,67 @@ +--TEST-- +asnyc query not cleaned before sync exec +--SKIPIF-- + +--FILE-- + $c->execAsync("select clock_timestamp(), pg_sleep(0.1), clock_timestamp()", function($r) { + var_dump([ + "cb" => $r->fetchRow() + ]); + }) +]); + +var_dump([ + "execParams" => $c->execParams("select \$1", [123])->fetchRow() +]); +?> +DONE +--EXPECTF-- +Test +array(1) { + ["async"]=> + NULL +} +array(1) { + ["cb"]=> + array(3) { + [0]=> + object(pq\DateTime)#%d (4) { + ["format"]=> + string(14) "Y-m-d H:i:s.uO" + ["date"]=> + string(26) "%s" + ["timezone_type"]=> + int(1) + ["timezone"]=> + string(6) "%s" + } + [1]=> + string(0) "" + [2]=> + object(pq\DateTime)#%d (4) { + ["format"]=> + string(14) "Y-m-d H:i:s.uO" + ["date"]=> + string(26) "%s" + ["timezone_type"]=> + int(1) + ["timezone"]=> + string(6) "%s" + } + } +} +array(1) { + ["execParams"]=> + array(1) { + [0]=> + string(3) "123" + } +} +DONE \ No newline at end of file