X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-pq;a=blobdiff_plain;f=tests%2Fnotify001.phpt;h=c0b26350aea690ff035584aa16c585ce1f122b22;hp=edb61205e2a3d137a04f5581d3cf1d8e23b680a5;hb=f593714e2c393c83f6224adf116f18ffae094d06;hpb=7f802ff71998282994dbfd9af51c08bb5d6dccdc diff --git a/tests/notify001.phpt b/tests/notify001.phpt index edb6120..c0b2635 100644 --- a/tests/notify001.phpt +++ b/tests/notify001.phpt @@ -22,17 +22,35 @@ $producer->notify("test", "this is an async test"); $r = array($consumer->socket); $w = null; $e = null; -var_dump(stream_select($r, $w, $e, NULL)); +stream_select($r, $w, $e, NULL); $consumer->poll(); -var_dump(stream_select($r, $w, $e, 0)); +$producer->notify("other", "this should not show up"); + +stream_select($r, $w, $e, 0,1000); $consumer->poll(); + +$producer->notify("test", "just to be sure"); + +$r = array($consumer->socket); +$w = null; $e = null; +stream_select($r, $w, $e, 0,1000); +$consumer->poll(); + +$consumer->unlisten("test"); + +$producer->notify("test", "this shouldn't show up either"); + +$r = array($consumer->socket); +$w = null; $e = null; +stream_select($r, $w, $e, 0,1000); +$consumer->poll(); + ?> DONE --EXPECTF-- Test test(%d): this is a test -int(1) test(%d): this is an async test -int(0) +test(%d): just to be sure DONE