File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 9
9
use GuzzleHttp \Psr7 \Response ;
10
10
use function GuzzleHttp \Psr7 \stream_for ;
11
11
use Http \Client \Common \HttpMethodsClient ;
12
+ use Http \Client \Common \HttpMethodsClientInterface ;
12
13
use PHPUnit \Framework \TestCase ;
13
14
14
15
class ResultPagerTest extends TestCase
@@ -70,10 +71,14 @@ public function testFetchAll()
70
71
))
71
72
;
72
73
73
- $ httpClient = $ this ->getMockBuilder (HttpMethodsClient::class)
74
- ->disableOriginalConstructor ()
75
- ->getMock ()
76
- ;
74
+ if (interface_exists (HttpMethodsClientInterface::class)) {
75
+ $ httpClient = $ this ->createMock (HttpMethodsClientInterface::class);
76
+ } else {
77
+ $ httpClient = $ this ->getMockBuilder (HttpMethodsClient::class)
78
+ ->disableOriginalConstructor ()
79
+ ->getMock ()
80
+ ;
81
+ }
77
82
78
83
$ httpClient ->expects ($ this ->exactly (2 ))
79
84
->method ('get ' )
You can’t perform that action at this time.
0 commit comments