summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/phpunit/includes/HtmlTest.php12
-rw-r--r--tests/phpunit/suite.xml4
2 files changed, 14 insertions, 2 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\"'."
+ );
+ }
+
}
diff --git a/tests/phpunit/suite.xml b/tests/phpunit/suite.xml
index f286fa11..56f64477 100644
--- a/tests/phpunit/suite.xml
+++ b/tests/phpunit/suite.xml
@@ -8,8 +8,8 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
stopOnFailure="false"
- timeoutForSmallTests="2"
- timeoutForMediumTests="10"
+ timeoutForSmallTests="10"
+ timeoutForMediumTests="30"
timeoutForLargeTests="60"
strict="true"
verbose="true">