Merge "Add method parameter type documentation"
[lhc/web/wiklou.git] / tests / phpunit / includes / GlobalFunctions / GlobalTest.php
index 57f8c19..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 ),
@@ -630,6 +630,15 @@ class GlobalTest extends MediaWikiTestCase {
                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
         */