mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Updated to guzzle 7
This commit is contained in:
@@ -37,6 +37,7 @@ class UrlValidator implements UrlValidatorInterface, RequestMethodInterface
|
||||
try {
|
||||
$this->httpClient->request(self::METHOD_GET, $url, [
|
||||
RequestOptions::ALLOW_REDIRECTS => ['max' => self::MAX_REDIRECTS],
|
||||
RequestOptions::IDN_CONVERSION => true,
|
||||
]);
|
||||
} catch (GuzzleException $e) {
|
||||
throw InvalidUrlException::fromUrl($url, $e);
|
||||
|
||||
@@ -48,7 +48,10 @@ class UrlValidatorTest extends TestCase
|
||||
$request = $this->httpClient->request(
|
||||
RequestMethodInterface::METHOD_GET,
|
||||
$expectedUrl,
|
||||
[RequestOptions::ALLOW_REDIRECTS => ['max' => 15]],
|
||||
[
|
||||
RequestOptions::ALLOW_REDIRECTS => ['max' => 15],
|
||||
RequestOptions::IDN_CONVERSION => true,
|
||||
],
|
||||
)->willReturn(new Response());
|
||||
|
||||
$this->urlValidator->validateUrl($expectedUrl);
|
||||
|
||||
Reference in New Issue
Block a user