File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,20 @@ public function testAddReadStream()
47
47
$ this ->loop ->tick ();
48
48
}
49
49
50
+ public function testAddReadStreamIgnoresSecondCallable ()
51
+ {
52
+ list ($ input , $ output ) = $ this ->createSocketPair ();
53
+
54
+ $ this ->loop ->addReadStream ($ input , $ this ->expectCallableExactly (2 ));
55
+ $ this ->loop ->addReadStream ($ input , $ this ->expectCallableNever ());
56
+
57
+ fwrite ($ output , "foo \n" );
58
+ $ this ->loop ->tick ();
59
+
60
+ fwrite ($ output , "bar \n" );
61
+ $ this ->loop ->tick ();
62
+ }
63
+
50
64
public function testAddWriteStream ()
51
65
{
52
66
list ($ input ) = $ this ->createSocketPair ();
@@ -56,6 +70,16 @@ public function testAddWriteStream()
56
70
$ this ->loop ->tick ();
57
71
}
58
72
73
+ public function testAddWriteStreamIgnoresSecondCallable ()
74
+ {
75
+ list ($ input ) = $ this ->createSocketPair ();
76
+
77
+ $ this ->loop ->addWriteStream ($ input , $ this ->expectCallableExactly (2 ));
78
+ $ this ->loop ->addWriteStream ($ input , $ this ->expectCallableNever ());
79
+ $ this ->loop ->tick ();
80
+ $ this ->loop ->tick ();
81
+ }
82
+
59
83
public function testRemoveReadStreamInstantly ()
60
84
{
61
85
list ($ input , $ output ) = $ this ->createSocketPair ();
You can’t perform that action at this time.
0 commit comments