summaryrefslogtreecommitdiff
path: root/tests/phpunit/includes
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2013-03-05 09:06:02 +0100
committerPierre Schmitz <pierre@archlinux.de>2013-03-05 09:06:02 +0100
commit0edd6983ba69e8195fa7cade96eca27df9ebf237 (patch)
treee0a5a8ee7fac4c7ce9d308419d13dbca13a7a609 /tests/phpunit/includes
parent8ef4b96a9b23b2cfc0eed4da0d6d324da9f9da2f (diff)
Update to MediaWiki 1.20.3
Diffstat (limited to 'tests/phpunit/includes')
-rw-r--r--tests/phpunit/includes/HtmlTest.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/phpunit/includes/HtmlTest.php b/tests/phpunit/includes/HtmlTest.php
index a18f7922..135ebc5a 100644
--- a/tests/phpunit/includes/HtmlTest.php
+++ b/tests/phpunit/includes/HtmlTest.php
@@ -565,4 +565,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\"'."
+ );
+ }
+
}