unlisten support
[m6w6/ext-pq] / tests / notify001.phpt
index 3f596a314465606acd3018e781ed4331cc682590..bb2b7c2ea5cb4bd754423d38120c29ee74b0f9da 100644 (file)
@@ -22,7 +22,7 @@ $producer->notify("test", "this is an async test");
 
 $r = array($consumer->socket);
 $w = null; $e = null;
 
 $r = array($consumer->socket);
 $w = null; $e = null;
-var_dump(stream_select($r, $w, $e, NULL));
+var_dump(stream_select($r, $w, $e, 0));
 $consumer->poll();
 
 $producer->notify("other", "this should not show up");
 $consumer->poll();
 
 $producer->notify("other", "this should not show up");
@@ -34,7 +34,16 @@ $producer->notify("test", "just to be sure");
 
 $r = array($consumer->socket);
 $w = null; $e = null;
 
 $r = array($consumer->socket);
 $w = null; $e = null;
-var_dump(stream_select($r, $w, $e, NULL));
+var_dump(stream_select($r, $w, $e, 0));
+$consumer->poll();
+
+$consumer->unlisten("test");
+
+$producer->notify("test", "this shouldn't show up either");
+
+$r = array($consumer->socket);
+$w = null; $e = null;
+var_dump(stream_select($r, $w, $e, 0));
 $consumer->poll();
 
 ?>
 $consumer->poll();
 
 ?>
@@ -47,4 +56,5 @@ test(%d): this is an async test
 int(0)
 int(1)
 test(%d): just to be sure
 int(0)
 int(1)
 test(%d): just to be sure
+int(0)
 DONE
 DONE