@@ -30,9 +30,7 @@ function it_returns_response(RequestInterface $request, ResponseInterface $respo
30
30
}
31
31
};
32
32
33
- $ promise = $ this ->handleRequest ($ request , $ next , function () {});
34
- $ promise ->shouldReturnAnInstanceOf ('Http\Client\Common\Deferred ' );
35
- $ promise ->wait ()->shouldReturn ($ response );
33
+ $ this ->handleRequest ($ request , $ next , function () {})->shouldReturnAnInstanceOf ('Http\Client\Promise\HttpFulfilledPromise ' );
36
34
}
37
35
38
36
function it_throws_exception_on_multiple_exceptions (RequestInterface $ request )
@@ -55,7 +53,7 @@ function it_throws_exception_on_multiple_exceptions(RequestInterface $request)
55
53
};
56
54
57
55
$ promise = $ this ->handleRequest ($ request , $ next , function () {});
58
- $ promise ->shouldReturnAnInstanceOf ('Http\Client\Common\Deferred ' );
56
+ $ promise ->shouldReturnAnInstanceOf ('Http\Client\Promise\HttpRejectedPromise ' );
59
57
$ promise ->shouldThrow ($ exception2 )->duringWait ();
60
58
}
61
59
@@ -78,7 +76,7 @@ function it_returns_response_on_second_try(RequestInterface $request, ResponseIn
78
76
};
79
77
80
78
$ promise = $ this ->handleRequest ($ request , $ next , function () {});
81
- $ promise ->shouldReturnAnInstanceOf ('Http\Client\Common\Deferred ' );
79
+ $ promise ->shouldReturnAnInstanceOf ('Http\Client\Promise\HttpFulfilledPromise ' );
82
80
$ promise ->wait ()->shouldReturn ($ response );
83
81
}
84
82
@@ -100,13 +98,8 @@ function it_does_not_keep_history_of_old_failure(RequestInterface $request, Resp
100
98
}
101
99
};
102
100
103
- $ promise = $ this ->handleRequest ($ request , $ next , function () {});
104
- $ promise ->shouldReturnAnInstanceOf ('Http\Client\Common\Deferred ' );
105
- $ promise ->wait ()->shouldReturn ($ response );
106
-
107
- $ promise = $ this ->handleRequest ($ request , $ next , function () {});
108
- $ promise ->shouldReturnAnInstanceOf ('Http\Client\Common\Deferred ' );
109
- $ promise ->wait ()->shouldReturn ($ response );
101
+ $ this ->handleRequest ($ request , $ next , function () {})->shouldReturnAnInstanceOf ('Http\Client\Promise\HttpFulfilledPromise ' );
102
+ $ this ->handleRequest ($ request , $ next , function () {})->shouldReturnAnInstanceOf ('Http\Client\Promise\HttpFulfilledPromise ' );
110
103
}
111
104
112
105
function it_has_an_exponential_default_delay (RequestInterface $ request , Exception \HttpException $ exception )
0 commit comments