From: Christian Weiske Date: Thu, 12 May 2011 17:25:03 +0000 (+0200) Subject: Merge branch 'master' into configurable-privacy2 X-Git-Tag: v0.98.0~46^2 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=88d7b9631b444cef28115fb8e0bae736b45e557e;p=semanticscuttle.git Merge branch 'master' into configurable-privacy2 --- 88d7b9631b444cef28115fb8e0bae736b45e557e diff --cc tests/TestBaseApi.php index 23e1812,036ab6b..2caa701 --- a/tests/TestBaseApi.php +++ b/tests/TestBaseApi.php @@@ -85,9 -92,26 +85,26 @@@ class TestBaseApi extends TestBas } + /** + * Completes an URL that's missing the protocol. + * Useful when re-using URLs extracted from HTML + * + * @param string $url Potentially partial URL + * + * @return string Full URL + */ + protected function completeUrl($url) + { + if (substr($url, 0, 2) == '//') { + $url = 'http:' . $url; + } + return $url; + } + + /** - * Creates a user and a HTTP request object and prepares + * Creates a user and a HTTP GET request object and prepares * the request object with authentication details, so that * the user is logged in. *