@@ -193,28 +193,28 @@ public function testAuthBearerOption()
193
193
194
194
public function testInvalidAuthBearerOption ()
195
195
{
196
- $ this ->expectException (' Symfony\Component\HttpClient\Exception\ InvalidArgumentException' );
196
+ $ this ->expectException (InvalidArgumentException::class );
197
197
$ this ->expectExceptionMessage ('Option "auth_bearer" must be a string, "object" given. ' );
198
198
self ::prepareRequest ('POST ' , 'http://example.com ' , ['auth_bearer ' => new \stdClass ()], HttpClientInterface::OPTIONS_DEFAULTS );
199
199
}
200
200
201
201
public function testInvalidAuthBearerValue ()
202
202
{
203
- $ this ->expectException (' Symfony\Component\HttpClient\Exception\ InvalidArgumentException' );
203
+ $ this ->expectException (InvalidArgumentException::class );
204
204
$ this ->expectExceptionMessage ('Invalid character found in option "auth_bearer": "a\nb". ' );
205
205
self ::prepareRequest ('POST ' , 'http://example.com ' , ['auth_bearer ' => "a \nb " ], HttpClientInterface::OPTIONS_DEFAULTS );
206
206
}
207
207
208
208
public function testSetAuthBasicAndBearerOptions ()
209
209
{
210
- $ this ->expectException (' Symfony\Component\HttpClient\Exception\ InvalidArgumentException' );
210
+ $ this ->expectException (InvalidArgumentException::class );
211
211
$ this ->expectExceptionMessage ('Define either the "auth_basic" or the "auth_bearer" option, setting both is not supported. ' );
212
212
self ::prepareRequest ('POST ' , 'http://example.com ' , ['auth_bearer ' => 'foo ' , 'auth_basic ' => 'foo:bar ' ], HttpClientInterface::OPTIONS_DEFAULTS );
213
213
}
214
214
215
215
public function testSetJSONAndBodyOptions ()
216
216
{
217
- $ this ->expectException (' Symfony\Component\HttpClient\Exception\ InvalidArgumentException' );
217
+ $ this ->expectException (InvalidArgumentException::class );
218
218
$ this ->expectExceptionMessage ('Define either the "json" or the "body" option, setting both is not supported ' );
219
219
self ::prepareRequest ('POST ' , 'http://example.com ' , ['json ' => ['foo ' => 'bar ' ], 'body ' => '<html/> ' ], HttpClientInterface::OPTIONS_DEFAULTS );
220
220
}
@@ -256,14 +256,14 @@ public function testNormalizePeerFingerprint($fingerprint, $expected)
256
256
257
257
public function testNormalizePeerFingerprintException ()
258
258
{
259
- $ this ->expectException (' Symfony\Component\HttpClient\Exception\ InvalidArgumentException' );
259
+ $ this ->expectException (InvalidArgumentException::class );
260
260
$ this ->expectExceptionMessage ('Cannot auto-detect fingerprint algorithm for "foo". ' );
261
261
$ this ->normalizePeerFingerprint ('foo ' );
262
262
}
263
263
264
264
public function testNormalizePeerFingerprintTypeException ()
265
265
{
266
- $ this ->expectException (' Symfony\Component\HttpClient\Exception\ InvalidArgumentException' );
266
+ $ this ->expectException (InvalidArgumentException::class );
267
267
$ this ->expectExceptionMessage ('Option "peer_fingerprint" must be string or array, "object" given. ' );
268
268
$ fingerprint = new \stdClass ();
269
269
0 commit comments