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()
194194 $ this ->assertSame ($ response , $ r );
195195 $ this ->assertNotNull ($ chunk ->getError ());
196196
197+ $ this ->expectException (TransportExceptionInterface::class);
197198 foreach ($ client ->stream ($ response ) as $ chunk ) {
198- $ this ->fail ('Already errored responses shouldn \'t be yielded ' );
199199 }
200200 }
201201
@@ -340,6 +340,16 @@ public function testStream()
340340
341341 $ this ->assertSame ($ response , $ r );
342342 $ 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 ());
343353 }
344354
345355 public function testAddToStream ()
You can’t perform that action at this time.
0 commit comments