@@ -138,7 +138,7 @@ public function testReturnsStreamThatWillBeClosedWhenPromiseResolvesWithClosedIn
138138
139139 public function testForwardsDataImmediatelyIfPromiseIsAlreadyResolved ()
140140 {
141- $ input = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
141+ $ input = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
142142 $ input ->expects ($ this ->once ())->method ('isWritable ' )->willReturn (true );
143143 $ input ->expects ($ this ->once ())->method ('write ' )->with ('hello ' );
144144 $ input ->expects ($ this ->never ())->method ('end ' );
@@ -151,7 +151,7 @@ public function testForwardsDataImmediatelyIfPromiseIsAlreadyResolved()
151151
152152 public function testForwardsDataInOneGoOncePromiseResolves ()
153153 {
154- $ input = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
154+ $ input = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
155155 $ input ->expects ($ this ->once ())->method ('isWritable ' )->willReturn (true );
156156 $ input ->expects ($ this ->once ())->method ('write ' )->with ('helloworld ' );
157157 $ input ->expects ($ this ->never ())->method ('end ' );
@@ -169,7 +169,7 @@ public function testForwardsDataInOneGoOncePromiseResolves()
169169
170170 public function testForwardsDataAndEndImmediatelyIfPromiseIsAlreadyResolved ()
171171 {
172- $ input = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
172+ $ input = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
173173 $ input ->expects ($ this ->once ())->method ('isWritable ' )->willReturn (true );
174174 $ input ->expects ($ this ->once ())->method ('write ' )->with ('hello ' );
175175 $ input ->expects ($ this ->once ())->method ('end ' )->with ('! ' );
@@ -183,7 +183,7 @@ public function testForwardsDataAndEndImmediatelyIfPromiseIsAlreadyResolved()
183183
184184 public function testForwardsDataAndEndOncePromiseResolves ()
185185 {
186- $ input = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
186+ $ input = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
187187 $ input ->expects ($ this ->once ())->method ('isWritable ' )->willReturn (true );
188188 $ input ->expects ($ this ->once ())->method ('write ' )->with ('helloworld! ' );
189189 $ input ->expects ($ this ->once ())->method ('end ' );
@@ -202,7 +202,7 @@ public function testForwardsDataAndEndOncePromiseResolves()
202202
203203 public function testForwardsNoDataWhenWritingAfterEndIfPromiseIsAlreadyResolved ()
204204 {
205- $ input = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
205+ $ input = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
206206 $ input ->expects ($ this ->once ())->method ('isWritable ' )->willReturn (true );
207207 $ input ->expects ($ this ->never ())->method ('write ' );
208208 $ input ->expects ($ this ->once ())->method ('end ' );
@@ -217,7 +217,7 @@ public function testForwardsNoDataWhenWritingAfterEndIfPromiseIsAlreadyResolved(
217217
218218 public function testForwardsNoDataWhenWritingAfterEndOncePromiseResolves ()
219219 {
220- $ input = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
220+ $ input = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
221221 $ input ->expects ($ this ->once ())->method ('isWritable ' )->willReturn (true );
222222 $ input ->expects ($ this ->never ())->method ('write ' );
223223 $ input ->expects ($ this ->once ())->method ('end ' );
@@ -272,7 +272,7 @@ public function testEmitsCloseOnlyOnceWhenClosingStreamMultipleTimes()
272272
273273 public function testClosingStreamWillCloseInputStream ()
274274 {
275- $ input = $ this ->getMock ('React\Stream\WritableStreamInterface ' );
275+ $ input = $ this ->getMockBuilder ('React\Stream\WritableStreamInterface ' )-> getMock ( );
276276 $ input ->expects ($ this ->once ())->method ('isWritable ' )->willReturn (true );
277277 $ input ->expects ($ this ->once ())->method ('close ' );
278278
0 commit comments