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 99use GuzzleHttp \Psr7 \Response ;
1010use function GuzzleHttp \Psr7 \stream_for ;
1111use Http \Client \Common \HttpMethodsClient ;
12+ use Http \Client \Common \HttpMethodsClientInterface ;
1213use PHPUnit \Framework \TestCase ;
1314
1415class ResultPagerTest extends TestCase
@@ -70,10 +71,14 @@ public function testFetchAll()
7071 ))
7172 ;
7273
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+ }
7782
7883 $ httpClient ->expects ($ this ->exactly (2 ))
7984 ->method ('get ' )
You can’t perform that action at this time.
0 commit comments