33namespace spec \Http \Client \Common ;
44
55use Http \Client \Exception \TransferException ;
6- use Http \Client \HttpClient ;
76use Http \Client \HttpAsyncClient ;
87use Http \Promise \Promise ;
98use Psr \Http \Message \RequestInterface ;
1211
1312class EmulatedHttpClientSpec extends ObjectBehavior
1413{
15- function let (HttpAsyncClient $ httpAsyncClient )
14+ public function let (HttpAsyncClient $ httpAsyncClient )
1615 {
1716 $ this ->beConstructedWith ($ httpAsyncClient );
1817 }
1918
20- function it_is_initializable ()
19+ public function it_is_initializable ()
2120 {
2221 $ this ->shouldHaveType ('Http\Client\Common\EmulatedHttpClient ' );
2322 }
2423
25- function it_is_an_http_client ()
24+ public function it_is_an_http_client ()
2625 {
2726 $ this ->shouldImplement ('Http\Client\HttpClient ' );
2827 }
2928
30- function it_is_an_async_http_client ()
29+ public function it_is_an_async_http_client ()
3130 {
3231 $ this ->shouldImplement ('Http\Client\HttpAsyncClient ' );
3332 }
3433
35- function it_emulates_a_successful_request (
34+ public function it_emulates_a_successful_request (
3635 HttpAsyncClient $ httpAsyncClient ,
3736 RequestInterface $ request ,
3837 Promise $ promise ,
@@ -47,7 +46,7 @@ function it_emulates_a_successful_request(
4746 $ this ->sendRequest ($ request )->shouldReturn ($ response );
4847 }
4948
50- function it_emulates_a_failed_request (HttpAsyncClient $ httpAsyncClient , RequestInterface $ request , Promise $ promise )
49+ public function it_emulates_a_failed_request (HttpAsyncClient $ httpAsyncClient , RequestInterface $ request , Promise $ promise )
5150 {
5251 $ promise ->wait ()->shouldBeCalled ();
5352 $ promise ->getState ()->willReturn (Promise::REJECTED );
@@ -58,7 +57,7 @@ function it_emulates_a_failed_request(HttpAsyncClient $httpAsyncClient, RequestI
5857 $ this ->shouldThrow ('Http\Client\Exception ' )->duringSendRequest ($ request );
5958 }
6059
61- function it_decorates_the_underlying_client (
60+ public function it_decorates_the_underlying_client (
6261 HttpAsyncClient $ httpAsyncClient ,
6362 RequestInterface $ request ,
6463 Promise $ promise
0 commit comments