From 2e44b49a2db3026050b136de9b00f749dd3ff939 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 25 Apr 2014 06:26:49 +0200 Subject: Update to MediaWiki 1.22.6 --- .../includes/GlobalFunctions/wfParseUrlTest.php | 146 --------------------- 1 file changed, 146 deletions(-) delete mode 100644 tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php (limited to 'tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php') diff --git a/tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php b/tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php deleted file mode 100644 index 5032dc11..00000000 --- a/tests/phpunit/includes/GlobalFunctions/wfParseUrlTest.php +++ /dev/null @@ -1,146 +0,0 @@ -setMwGlobals( 'wgUrlProtocols', array( - '//', 'http://', 'file://', 'mailto:', - ) ); - } - - /** - * @dataProvider provideURLs - */ - public function testWfParseUrl( $url, $parts ) { - $partsDump = var_export( $parts, true ); - $this->assertEquals( - $parts, - wfParseUrl( $url ), - "Testing $url parses to $partsDump" - ); - } - - /** - * Provider of URLs for testing wfParseUrl() - * - * @return array - */ - public static function provideURLs() { - return array( - array( - '//example.org', - array( - 'scheme' => '', - 'delimiter' => '//', - 'host' => 'example.org', - ) - ), - array( - 'http://example.org', - array( - 'scheme' => 'http', - 'delimiter' => '://', - 'host' => 'example.org', - ) - ), - array( - 'http://id:key@example.org:123/path?foo=bar#baz', - array( - 'scheme' => 'http', - 'delimiter' => '://', - 'user' => 'id', - 'pass' => 'key', - 'host' => 'example.org', - 'port' => 123, - 'path' => '/path', - 'query' => 'foo=bar', - 'fragment' => 'baz', - ) - ), - array( - 'file://example.org/etc/php.ini', - array( - 'scheme' => 'file', - 'delimiter' => '://', - 'host' => 'example.org', - 'path' => '/etc/php.ini', - ) - ), - array( - 'file:///etc/php.ini', - array( - 'scheme' => 'file', - 'delimiter' => '://', - 'host' => '', - 'path' => '/etc/php.ini', - ) - ), - array( - 'file:///c:/', - array( - 'scheme' => 'file', - 'delimiter' => '://', - 'host' => '', - 'path' => '/c:/', - ) - ), - array( - 'mailto:id@example.org', - array( - 'scheme' => 'mailto', - 'delimiter' => ':', - 'host' => 'id@example.org', - 'path' => '', - ) - ), - array( - 'mailto:id@example.org?subject=Foo', - array( - 'scheme' => 'mailto', - 'delimiter' => ':', - 'host' => 'id@example.org', - 'path' => '', - 'query' => 'subject=Foo', - ) - ), - array( - 'mailto:?subject=Foo', - array( - 'scheme' => 'mailto', - 'delimiter' => ':', - 'host' => '', - 'path' => '', - 'query' => 'subject=Foo', - ) - ), - array( - 'invalid://test/', - false - ), - ); - } -} -- cgit v1.2.2