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 @@ -258,7 +258,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
258
258
break ;
259
259
260
260
case 'testDnsError ' :
261
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
261
+ $ mock = $ this ->createMock (ResponseInterface::class);
262
262
$ mock ->expects ($ this ->any ())
263
263
->method ('getStatusCode ' )
264
264
->willThrowException (new TransportException ('DSN error ' ));
@@ -281,7 +281,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
281
281
break ;
282
282
283
283
case 'testTimeoutOnAccess ' :
284
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
284
+ $ mock = $ this ->createMock (ResponseInterface::class);
285
285
$ mock ->expects ($ this ->any ())
286
286
->method ('getHeaders ' )
287
287
->willThrowException (new TransportException ('Timeout ' ));
@@ -348,7 +348,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
348
348
break ;
349
349
350
350
case 'testMaxDuration ' :
351
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
351
+ $ mock = $ this ->createMock (ResponseInterface::class);
352
352
$ mock ->expects ($ this ->any ())
353
353
->method ('getContent ' )
354
354
->willReturnCallback (static function (): void {
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ public static function setUpBeforeClass(): void
29
29
30
30
public function testItTracesRequest ()
31
31
{
32
- $ httpClient = $ this ->getMockBuilder (HttpClientInterface::class)-> getMock ( );
32
+ $ httpClient = $ this ->createMock (HttpClientInterface::class);
33
33
$ httpClient
34
34
->expects ($ this ->once ())
35
35
->method ('request ' )
You can’t perform that action at this time.
0 commit comments