Try multiple postgresql versions
[m6w6/ext-pq] / tests / notify001.phpt
index edb61205e2a3d137a04f5581d3cf1d8e23b680a5..c0b26350aea690ff035584aa16c585ce1f122b22 100644 (file)
@@ -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