File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -194,8 +194,8 @@ public function testDnsError()
194
194
$ this ->assertSame ($ response , $ r );
195
195
$ this ->assertNotNull ($ chunk ->getError ());
196
196
197
+ $ this ->expectException (TransportExceptionInterface::class);
197
198
foreach ($ client ->stream ($ response ) as $ chunk ) {
198
- $ this ->fail ('Already errored responses shouldn \'t be yielded ' );
199
199
}
200
200
}
201
201
@@ -340,6 +340,16 @@ public function testStream()
340
340
341
341
$ this ->assertSame ($ response , $ r );
342
342
$ this ->assertSame (['f ' , 'l ' ], $ result );
343
+
344
+ $ chunk = null ;
345
+ $ i = 0 ;
346
+
347
+ foreach ($ client ->stream ($ response ) as $ chunk ) {
348
+ ++$ i ;
349
+ }
350
+
351
+ $ this ->assertSame (1 , $ i );
352
+ $ this ->assertTrue ($ chunk ->isLast ());
343
353
}
344
354
345
355
public function testAddToStream ()
You can’t perform that action at this time.
0 commit comments