Http::getProxy() method to get proxy configuration
[lhc/web/wiklou.git] / tests / phpunit / includes / HttpTest.php
index ea4b646..246c609 100644 (file)
@@ -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
         */