X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2Fhttp%2FHttpTest.php;h=eee4296281bc75cbf33e80e05d93a59d34c04724;hb=4d6828ef7835b7c5c5e903637fcba4bf5c487e1b;hp=ac7ef8027c0523d6640390df52de886a8ede9389;hpb=307c95dbcdf6cfce7fc2ee4035724ac82eb49c5e;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/includes/http/HttpTest.php b/tests/phpunit/includes/http/HttpTest.php index ac7ef8027c..eee4296281 100644 --- a/tests/phpunit/includes/http/HttpTest.php +++ b/tests/phpunit/includes/http/HttpTest.php @@ -1,9 +1,5 @@ assertTrue( defined( $value ), $value . ' not defined' ); } - - /** - * No actual request is made herein - */ - public function testGuzzleHttpRequest() { - $handler = HandlerStack::create( new MockHandler( [ new Response( 200 ) ] ) ); - $r = new GuzzleHttpRequest( 'http://www.example.text', [ 'handler' => $handler ] ); - $r->execute(); - $this->assertEquals( 200, $r->getStatus() ); - - // @TODO: add failure tests (404s and failure to connect) - } } /** @@ -531,7 +515,7 @@ class MWHttpRequestTester extends MWHttpRequest { if ( !Http::$httpEngine ) { Http::$httpEngine = 'guzzle'; } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) { - throw new DomainException( __METHOD__ . ': curl (https://secure.php.net/curl) is not ' . + throw new DomainException( __METHOD__ . ': curl (https://www.php.net/curl) is not ' . 'installed, but Http::$httpEngine is set to "curl"' ); } @@ -544,7 +528,7 @@ class MWHttpRequestTester extends MWHttpRequest { if ( !wfIniGetBool( 'allow_url_fopen' ) ) { throw new DomainException( __METHOD__ . ': allow_url_fopen needs to be enabled for pure PHP HTTP requests to work. ' - . 'If possible, curl should be used instead. See https://secure.php.net/curl.' ); + . 'If possible, curl should be used instead. See https://www.php.net/curl.' ); } return new PhpHttpRequestTester( $url, $options, $caller );