File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -267,7 +267,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
267
267
break ;
268
268
269
269
case 'testDnsError ' :
270
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
270
+ $ mock = $ this ->createMock (ResponseInterface::class);
271
271
$ mock ->expects ($ this ->any ())
272
272
->method ('getStatusCode ' )
273
273
->willThrowException (new TransportException ('DSN error ' ));
@@ -290,7 +290,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
290
290
break ;
291
291
292
292
case 'testTimeoutOnAccess ' :
293
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
293
+ $ mock = $ this ->createMock (ResponseInterface::class);
294
294
$ mock ->expects ($ this ->any ())
295
295
->method ('getHeaders ' )
296
296
->willThrowException (new TransportException ('Timeout ' ));
@@ -357,7 +357,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
357
357
break ;
358
358
359
359
case 'testMaxDuration ' :
360
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
360
+ $ mock = $ this ->createMock (ResponseInterface::class);
361
361
$ mock ->expects ($ this ->any ())
362
362
->method ('getContent ' )
363
363
->willReturnCallback (static function (): void {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ public static function setUpBeforeClass(): void
31
31
32
32
public function testItTracesRequest ()
33
33
{
34
- $ httpClient = $ this ->getMockBuilder (HttpClientInterface::class)-> getMock ( );
34
+ $ httpClient = $ this ->createMock (HttpClientInterface::class);
35
35
$ httpClient
36
36
->expects ($ this ->any ())
37
37
->method ('request ' )
You can’t perform that action at this time.
0 commit comments