MediaWiki
REL1_19
|
tests for includes/Html.php More...
Public Member Functions | |
assertNsSelectorIdAndName ($expectedId, $expectedName, $html, $msg= '') | |
Helper to verify <select> attributes generated by Html::namespaceSelector() This helper expect the Html method to use 'namespace' as a default value for both 'id' and 'name' attributes. | |
setUp () | |
tearDown () | |
testExpandAttributesForBooleans () | |
testExpandAttributesListValueAttributes () | |
Html::expandAttributes has special features for HTML attributes that use space separated lists and also allows arrays to be used as values. | |
testExpandAttributesSkipsNullAndFalse () | |
testExpandAttributesSpaceSeparatedAttributesWithBoolean () | |
Test feature added by r96188, let pass attributes values as a PHP array. | |
testExpandAttributesVariousExpansions () | |
Test for Html::expandAttributes() Please note it output a string prefixed with a space! | |
testFormValidationBlacklist () | |
testNamespaceSelector () | |
testNamespaceSelectorIdAndNameDefaultsAttributes () | |
testValueIsAuthoritativeInSpaceSeparatedAttributesArrays () | |
How do we handle duplicate keys in HTML attributes expansion? We could pass a "class" the values: 'GREEN' and array( 'GREEN' => false ) The later will take precedence. | |
Static Private Attributes | |
static | $oldContLang |
static | $oldLang |
static | $oldLanguageCode |
static | $oldNamespaces |
tests for includes/Html.php
Definition at line 4 of file HtmlTest.php.
HtmlTest::assertNsSelectorIdAndName | ( | $ | expectedId, |
$ | expectedName, | ||
$ | html, | ||
$ | msg = '' |
||
) |
Helper to verify <select> attributes generated by Html::namespaceSelector() This helper expect the Html method to use 'namespace' as a default value for both 'id' and 'name' attributes.
String | $expectedId | <select> id attribute value |
String | $expectedName | <select> name attribute value |
String | $html | Output of a call to Html::namespaceSelector() |
String | $msg | Optional message (default: '') |
Definition at line 310 of file HtmlTest.php.
Referenced by testNamespaceSelectorIdAndNameDefaultsAttributes().
HtmlTest::setUp | ( | ) |
Definition at line 10 of file HtmlTest.php.
References $wgContLang, $wgLang, $wgLanguageCode, and Language\factory().
Definition at line 44 of file HtmlTest.php.
References $oldContLang, $oldLang, $oldLanguageCode, $wgContLang, $wgLang, and $wgLanguageCode.
Definition at line 70 of file HtmlTest.php.
References $wgHtml5, and Html\expandAttributes().
Html::expandAttributes has special features for HTML attributes that use space separated lists and also allows arrays to be used as values.
Definition at line 128 of file HtmlTest.php.
References Html\expandAttributes().
Definition at line 53 of file HtmlTest.php.
References Html\expandAttributes().
Test feature added by r96188, let pass attributes values as a PHP array.
Restricted to class,rel, accesskey.
Definition at line 179 of file HtmlTest.php.
References Html\expandAttributes().
Test for Html::expandAttributes() Please note it output a string prefixed with a space!
Definition at line 99 of file HtmlTest.php.
References Html\expandAttributes().
Definition at line 333 of file HtmlTest.php.
References Html\expandAttributes().
Definition at line 214 of file HtmlTest.php.
References Html\namespaceSelector().
Definition at line 262 of file HtmlTest.php.
References assertNsSelectorIdAndName(), and Html\namespaceSelector().
How do we handle duplicate keys in HTML attributes expansion? We could pass a "class" the values: 'GREEN' and array( 'GREEN' => false ) The later will take precedence.
Feature added by r96188
Definition at line 203 of file HtmlTest.php.
References Html\expandAttributes().
HtmlTest::$oldContLang [static, private] |
Definition at line 6 of file HtmlTest.php.
Referenced by tearDown().
HtmlTest::$oldLang [static, private] |
Definition at line 5 of file HtmlTest.php.
Referenced by tearDown().
HtmlTest::$oldLanguageCode [static, private] |
Definition at line 7 of file HtmlTest.php.
Referenced by tearDown().
HtmlTest::$oldNamespaces [static, private] |
Definition at line 8 of file HtmlTest.php.