Merge "(bug 37209) Make TextContentTest and WikitextContentTest work in all cases"
[lhc/web/wiklou.git] / tests / phpunit / includes / HtmlTest.php
index 65dd924..47fa5f4 100644 (file)
@@ -605,4 +605,16 @@ class HtmlTest extends MediaWikiTestCase {
                return $ret;
        }
 
+       public function testFormValidationBlacklist() {
+               $this->assertEmpty(
+                       Html::expandAttributes( array( 'min' => 1, 'max' => 100, 'pattern' => 'abc', 'required' => true, 'step' => 2 ) ),
+                       'Blacklist form validation attributes.'
+               );
+               $this->assertEquals(
+                       ' step=any',
+                       Html::expandAttributes( array( 'min' => 1, 'max' => 100, 'pattern' => 'abc', 'required' => true, 'step' => 'any' ) ),
+                       'Allow special case "step=any".'
+               );
+       }
+
 }