Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e7ee92

Browse files
committed
Make ignore removed callbacks test pass on OSX
It requires something to be written to the stream to trigger the event.
1 parent f1e7f9a commit 4e7ee92

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/React/Tests/EventLoop/AbstractLoopTest.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ public function stopShouldStopRunningLoop()
169169

170170
public function testIgnoreRemovedCallback()
171171
{
172+
// two independent streams, both should be readable right away
172173
$stream1 = fopen('php://temp', 'r+');
173174
$stream2 = fopen('php://temp', 'r+');
174-
// two independant streams, both should be readable right away
175175

176176
$loop = $this->loop;
177177
$loop->addReadStream($stream1, function ($stream) use ($loop, $stream2) {
@@ -185,6 +185,11 @@ public function testIgnoreRemovedCallback()
185185
$loop->removeReadStream($stream1);
186186
});
187187

188+
fwrite($stream1, "foo\n");
189+
rewind($stream1);
190+
fwrite($stream2, "foo\n");
191+
rewind($stream2);
192+
188193
$loop->run();
189194
}
190195

0 commit comments

Comments
 (0)