X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=tests%2Fphpunit%2Fincludes%2FHttpTest.php;h=246c609ed2084e34f9036f12c4034d2586c4fce5;hp=8a0dff786a0a96e30c54aa2abbfb1b004bb31e1e;hb=6ae9367cddf8565c948f4d9458b07bb688f2ddc2;hpb=8c087b9fd13d9302ec1be2176ef1ae344b3f8273 diff --git a/tests/phpunit/includes/HttpTest.php b/tests/phpunit/includes/HttpTest.php index 8a0dff786a..246c609ed2 100644 --- a/tests/phpunit/includes/HttpTest.php +++ b/tests/phpunit/includes/HttpTest.php @@ -62,6 +62,17 @@ class HttpTest extends MediaWikiTestCase { ); } + /** + * @covers Http::getProxy + */ + public function testGetProxy() { + $this->setMwGlobals( 'wgHTTPProxy', 'proxy.domain.tld' ); + $this->assertEquals( + 'proxy.domain.tld', + Http::getProxy() + ); + } + /** * Feeds URI to test a long regular expression in Http::isValidURI */ @@ -95,8 +106,8 @@ class HttpTest extends MediaWikiTestCase { # (\S+) - host part is made of anything not whitespaces // commented these out in order to remove @group Broken // @todo are these valid tests? if so, fix Http::isValidURI so it can handle them - //array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ), - //array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ), + // array( false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ), + // array( false, 'http://exam:ple.org/', 'hostname can not use colons!' ), # (:[0-9]+)? - port number array( true, 'http://example.org:80/' ),