Merge "Improve Database related documentation a bit"
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / wfParseUrlTest.php
index 841a1b1..af834f8 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Tests for wfParseUrl()
- *
  * Copyright © 2013 Alexandre Emsenhuber
  *
  * This program is free software; you can redistribute it and/or modify
  * @file
  */
 
+/**
+ * @covers ::wfParseUrl
+ */
 class WfParseUrlTest extends MediaWikiTestCase {
        protected function setUp() {
                parent::setUp();
 
                $this->setMwGlobals( 'wgUrlProtocols', array(
-                       '//', 'http://', 'file://', 'mailto:',
+                       '//',
+                       'http://',
+                       'https://',
+                       'file://',
+                       'mailto:',
                ) );
        }
 
-       /** @dataProvider provideURLs */
+       /**
+        * @dataProvider provideURLs
+        */
        public function testWfParseUrl( $url, $parts ) {
-               $partsDump = var_export( $parts, true );
                $this->assertEquals(
                        $parts,
-                       wfParseUrl( $url ),
-                       "Testing $url parses to $partsDump"
+                       wfParseUrl( $url )
                );
        }
 
@@ -64,6 +69,14 @@ class WfParseUrlTest extends MediaWikiTestCase {
                                        'host' => 'example.org',
                                )
                        ),
+                       array(
+                               'https://example.org',
+                               array(
+                                       'scheme' => 'https',
+                                       'delimiter' => '://',
+                                       'host' => 'example.org',
+                               )
+                       ),
                        array(
                                'http://id:key@example.org:123/path?foo=bar#baz',
                                array(