X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=tests%2Fcallback002.phpt;fp=tests%2Fcallback002.phpt;h=7d7903b1f52e1e5096fd0dbe1dea6510515d2f83;hp=0000000000000000000000000000000000000000;hb=a06db6d217fc8ba0fd9b8273a9e595477d59afcc;hpb=0d8fc412a6fdd65f6bc89ae77b132ca119e00c6c diff --git a/tests/callback002.phpt b/tests/callback002.phpt new file mode 100644 index 0000000..7d7903b --- /dev/null +++ b/tests/callback002.phpt @@ -0,0 +1,44 @@ +--TEST-- +callback sanity +--SKIPIF-- + +--FILE-- +execAsync("select 1; select 2", function($r) { + print_r($r->fetchAll()); +}); +try { + $c->execAsync("select 3; select 4", function($r) { + + }); +} catch (Exception $e) { + printf("%s\n", $e->getMessage()); +} +$c->exec(""); +?> +===DONE=== +--EXPECT-- +Test +Failed to execute query (another command is already in progress) +Array +( + [0] => Array + ( + [0] => 1 + ) + +) +Array +( + [0] => Array + ( + [0] => 2 + ) + +) +===DONE===