33namespace Clue \Tests \React \Tar ;
44
55use Clue \React \Tar \Decoder ;
6- use React \EventLoop \Factory ;
6+ use React \EventLoop \Loop ;
77use React \Stream \ReadableResourceStream ;
88
99class FunctionDecoderTest extends TestCase
@@ -16,7 +16,6 @@ class FunctionDecoderTest extends TestCase
1616 public function setUpDecoderAndLoop ()
1717 {
1818 $ this ->decoder = new Decoder ();
19- $ this ->loop = Factory::create ();
2019 }
2120
2221 /**
@@ -28,7 +27,7 @@ public function testAliceBob()
2827
2928 $ stream ->pipe ($ this ->decoder );
3029
31- $ this -> loop -> run ();
30+ Loop:: run ();
3231 }
3332
3433 /**
@@ -41,7 +40,7 @@ public function testAliceBobWithSmallBufferSize()
4140
4241 $ stream ->pipe ($ this ->decoder );
4342
44- $ this -> loop -> run ();
43+ Loop:: run ();
4544 }
4645
4746 public function testStreamingSingleEmptyEmitsSingleEntryWithEmptyStream ()
@@ -69,7 +68,7 @@ public function testStreamingSingleEmptyEmitsSingleEntryWithEmptyStream()
6968
7069 $ stream ->pipe ($ this ->decoder );
7170
72- $ this -> loop -> run ();
71+ Loop:: run ();
7372 }
7473
7574 public function testCompleteEndSingleEmtpyBehavesSameAsStreaming ()
@@ -83,6 +82,6 @@ public function testCompleteEndSingleEmtpyBehavesSameAsStreaming()
8382
8483 private function createStream ($ name , $ readChunkSize = null )
8584 {
86- return new ReadableResourceStream (fopen (__DIR__ . '/fixtures/ ' . $ name , 'r ' ), $ this -> loop , $ readChunkSize );
85+ return new ReadableResourceStream (fopen (__DIR__ . '/fixtures/ ' . $ name , 'r ' ), null , $ readChunkSize );
8786 }
8887}
0 commit comments