Adapt tests
This commit is contained in:
+11
@@ -39,6 +39,17 @@ abstract class DI
|
||||
self::$dice = $dice;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a clone of the current dice instance
|
||||
* This usefull for overloading the current instance with mocked methods during tests
|
||||
*
|
||||
* @return Dice
|
||||
*/
|
||||
public static function getDice()
|
||||
{
|
||||
return clone self::$dice;
|
||||
}
|
||||
|
||||
//
|
||||
// common instances
|
||||
//
|
||||
|
||||
@@ -92,11 +92,6 @@ class HTTPClient implements IHTTPClient
|
||||
return CurlResult::createErrorCurl($url);
|
||||
}
|
||||
|
||||
if (Network::isRedirectBlocked($url)) {
|
||||
$this->logger->info('Domain should not be redirected.', ['url' => $url]);
|
||||
return CurlResult::createErrorCurl($url);
|
||||
}
|
||||
|
||||
$conf = [];
|
||||
|
||||
if (!empty($opts['cookiejar'])) {
|
||||
|
||||
@@ -107,7 +107,6 @@ interface IHTTPClient
|
||||
*
|
||||
* @return string A canonical URL
|
||||
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
|
||||
* @see ParseUrl::getSiteinfo
|
||||
*/
|
||||
public function finalUrl(string $url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user