@@ -497,7 +497,7 @@ public function testRequestOptionsAbsoluteEvent()
497497 $ this ->assertSame ('example.com ' , $ requestAssertion ->getHeaderLine ('Host ' ));
498498 }
499499
500- public function testRequestPauseWillbeForwardedToConnection ()
500+ public function testRequestPauseWillBeForwardedToConnection ()
501501 {
502502 $ server = new StreamingServer (function (ServerRequestInterface $ request ) {
503503 $ request ->getBody ()->pause ();
@@ -517,7 +517,7 @@ public function testRequestPauseWillbeForwardedToConnection()
517517 $ this ->connection ->emit ('data ' , array ($ data ));
518518 }
519519
520- public function testRequestResumeWillbeForwardedToConnection ()
520+ public function testRequestResumeWillBeForwardedToConnection ()
521521 {
522522 $ server = new StreamingServer (function (ServerRequestInterface $ request ) {
523523 $ request ->getBody ()->resume ();
@@ -532,13 +532,13 @@ public function testRequestResumeWillbeForwardedToConnection()
532532 $ this ->connection ->emit ('data ' , array ($ data ));
533533 }
534534
535- public function testRequestCloseWillPauseConnection ()
535+ public function testRequestCloseWillNotCloseConnection ()
536536 {
537537 $ server = new StreamingServer (function (ServerRequestInterface $ request ) {
538538 $ request ->getBody ()->close ();
539539 });
540540
541- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
541+ $ this ->connection ->expects ($ this ->never ())->method ('close ' );
542542
543543 $ server ->listen ($ this ->socket );
544544 $ this ->socket ->emit ('connection ' , array ($ this ->connection ));
@@ -554,7 +554,8 @@ public function testRequestPauseAfterCloseWillNotBeForwarded()
554554 $ request ->getBody ()->pause ();
555555 });
556556
557- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
557+ $ this ->connection ->expects ($ this ->never ())->method ('close ' );
558+ $ this ->connection ->expects ($ this ->never ())->method ('pause ' );
558559
559560 $ server ->listen ($ this ->socket );
560561 $ this ->socket ->emit ('connection ' , array ($ this ->connection ));
@@ -570,7 +571,7 @@ public function testRequestResumeAfterCloseWillNotBeForwarded()
570571 $ request ->getBody ()->resume ();
571572 });
572573
573- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
574+ $ this ->connection ->expects ($ this ->never ())->method ('close ' );
574575 $ this ->connection ->expects ($ this ->never ())->method ('resume ' );
575576
576577 $ server ->listen ($ this ->socket );
@@ -1964,7 +1965,6 @@ public function testRequestInvalidChunkHeaderTooLongWillEmitErrorOnRequestStream
19641965 });
19651966
19661967 $ this ->connection ->expects ($ this ->never ())->method ('close ' );
1967- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
19681968
19691969 $ server ->listen ($ this ->socket );
19701970 $ this ->socket ->emit ('connection ' , array ($ this ->connection ));
@@ -1989,7 +1989,6 @@ public function testRequestInvalidChunkBodyTooLongWillEmitErrorOnRequestStream()
19891989 });
19901990
19911991 $ this ->connection ->expects ($ this ->never ())->method ('close ' );
1992- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
19931992
19941993 $ server ->listen ($ this ->socket );
19951994 $ this ->socket ->emit ('connection ' , array ($ this ->connection ));
@@ -2012,7 +2011,6 @@ public function testRequestUnexpectedEndOfRequestWithChunkedTransferConnectionWi
20122011 });
20132012
20142013 $ this ->connection ->expects ($ this ->never ())->method ('close ' );
2015- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
20162014
20172015 $ server ->listen ($ this ->socket );
20182016 $ this ->socket ->emit ('connection ' , array ($ this ->connection ));
@@ -2036,7 +2034,6 @@ public function testRequestInvalidChunkHeaderWillEmitErrorOnRequestStream()
20362034 });
20372035
20382036 $ this ->connection ->expects ($ this ->never ())->method ('close ' );
2039- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
20402037
20412038 $ server ->listen ($ this ->socket );
20422039 $ this ->socket ->emit ('connection ' , array ($ this ->connection ));
@@ -2059,7 +2056,6 @@ public function testRequestUnexpectedEndOfRequestWithContentLengthWillEmitErrorO
20592056 });
20602057
20612058 $ this ->connection ->expects ($ this ->never ())->method ('close ' );
2062- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
20632059
20642060 $ server ->listen ($ this ->socket );
20652061 $ this ->socket ->emit ('connection ' , array ($ this ->connection ));
@@ -2089,7 +2085,6 @@ public function testRequestWithoutBodyWillEmitEndOnRequestStream()
20892085 $ request ->getBody ()->on ('error ' , $ errorEvent );
20902086 });
20912087
2092- $ this ->connection ->expects ($ this ->once ())->method ('pause ' );
20932088 $ this ->connection ->expects ($ this ->never ())->method ('close ' );
20942089
20952090 $ server ->listen ($ this ->socket );
0 commit comments