* Class to let us overwrite MWHttpRequest respHeaders variable
*/
class MWHttpRequestTester extends MWHttpRequest {
-
// function derived from the MWHttpRequest factory function but
// returns appropriate tester class here
public static function factory( $url, $options = null ) {
return new CurlHttpRequestTester( $url, $options );
case 'php':
if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
- throw new MWException( __METHOD__ . ': allow_url_fopen needs to be enabled for pure PHP' .
- ' http requests to work. If possible, curl should be used instead. See http://php.net/curl.' );
+ throw new MWException( __METHOD__ .
+ ': allow_url_fopen needs to be enabled for pure PHP HTTP requests to work. '
+ . 'If possible, curl should be used instead. See http://php.net/curl.' );
}
return new PhpHttpRequestTester( $url, $options );