Merge "Add method parameter type documentation"
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / GlobalTest.php
index 408d440..244b100 100644 (file)
@@ -424,7 +424,7 @@ class GlobalTest extends MediaWikiTestCase {
        /** array( shorthand, expected integer ) */
        public static function provideShorthand() {
                return array(
-                       # Null, empty ... 
+                       # Null, empty ...
                        array( '', -1 ),
                        array( '  ', -1 ),
                        array( null, -1 ),
@@ -623,15 +623,22 @@ class GlobalTest extends MediaWikiTestCase {
                                array( "$p//www.example2.com", array( 'www.example.com', 'www.example2.com', 'www.example3.com' ), true, "Exact match with other domains in array, $pDesc URL" ),
                                array( "$p//www.example2.com", array( 'example.com', 'example2.com', 'example3,com' ), true, "Match without subdomain with other domains in array, $pDesc URL" ),
                                array( "$p//www.example4.com", array( 'example.com', 'example2.com', 'example3,com' ), false, "Domain not in array, $pDesc URL" ),
-
-                               // FIXME: This is a bug in wfMatchesDomainList(). If and when this is fixed, update this test case
-                               array( "$p//nds-nl.wikipedia.org", array( 'nl.wikipedia.org' ), true, "Substrings of domains match while they shouldn't, $pDesc URL" ),
+                               array( "$p//nds-nl.wikipedia.org", array( 'nl.wikipedia.org' ), false, "Non-matching substring of domain, $pDesc URL" ),
                        ) );
                }
 
                return $a;
        }
 
+       function testWfMkdirParents() {
+               // Should not return true if file exists instead of directory
+               $fname = $this->getNewTempFile();
+               wfSuppressWarnings();
+               $ok = wfMkdirParents( $fname );
+               wfRestoreWarnings();
+               $this->assertFalse( $ok );
+       }
+
        /**
         * @dataProvider provideWfShellMaintenanceCmdList
         */