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 @@ -137,7 +137,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
137
137
break ;
138
138
139
139
case 'testDnsError ' :
140
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
140
+ $ mock = $ this ->createMock (ResponseInterface::class);
141
141
$ mock ->expects ($ this ->any ())
142
142
->method ('getStatusCode ' )
143
143
->willThrowException (new TransportException ('DSN error ' ));
@@ -160,7 +160,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
160
160
break ;
161
161
162
162
case 'testTimeoutOnAccess ' :
163
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
163
+ $ mock = $ this ->createMock (ResponseInterface::class);
164
164
$ mock ->expects ($ this ->any ())
165
165
->method ('getHeaders ' )
166
166
->willThrowException (new TransportException ('Timeout ' ));
@@ -227,7 +227,7 @@ protected function getHttpClient(string $testCase): HttpClientInterface
227
227
break ;
228
228
229
229
case 'testMaxDuration ' :
230
- $ mock = $ this ->getMockBuilder (ResponseInterface::class)-> getMock ( );
230
+ $ mock = $ this ->createMock (ResponseInterface::class);
231
231
$ mock ->expects ($ this ->any ())
232
232
->method ('getContent ' )
233
233
->willReturnCallback (static function (): void {
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class TraceableHttpClientTest extends TestCase
21
21
{
22
22
public function testItTracesRequest ()
23
23
{
24
- $ httpClient = $ this ->getMockBuilder (HttpClientInterface::class)-> getMock ( );
24
+ $ httpClient = $ this ->createMock (HttpClientInterface::class);
25
25
$ httpClient
26
26
->expects ($ this ->once ())
27
27
->method ('request ' )
You can’t perform that action at this time.
0 commit comments