[TESTS] Add code coverage annotations to entities

This commit is contained in:
2021-08-18 17:30:02 +01:00
parent e7699b3245
commit 2ccbbd53a6
4 changed files with 27 additions and 5 deletions

View File

@@ -148,8 +148,10 @@ class Link extends Entity
// This must come before getInfo given that Symfony HTTPClient is lazy (thus forcing curl exec)
try {
$headers = $head->getHeaders();
// @codeCoverageIgnoreStart
} catch (ClientException $e) {
throw new InvalidArgumentException(previous: $e);
// @codeCoverageIgnoreEnd
}
$url = $head->getInfo('url'); // The last effective url (after getHeaders, so it follows redirects)
$url_hash = hash(self::URLHASH_ALGO, $url);