MediaWiki
REL1_20
|
tests for includes/Html.php More...
Public Member Functions | |
disableHTML5 () | |
Wrapper to easily set $wgHTML5 = false Original value will be restored after test completion. | |
enableHTML5 () | |
Wrapper to easily set $wgHTML5 = true. | |
provideElementsWithAttributesHavingDefaultValues () | |
providesHtml5InputTypes () | |
List of input element types values introduced by HTML5 Full list at http://www.w3.org/TR/html-markup/input.html. | |
setUp () | |
tearDown () | |
testCanDisableANamespaces () | |
testCanFilterOutNamespaces () | |
testDropDefaults ($expected, $element, $message= '') | |
Test out Html::element drops default value Html::dropDefaults provideElementsWithAttributesHavingDefaultValues. | |
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 () | |
testHtmlElementAcceptsNewHtml5TypesInHtml5Mode ($HTML5InputType) | |
providesHtml5InputTypes | |
testNamespaceSelector () | |
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 | $oldHTML5 |
static | $oldLang |
static | $oldLanguageCode |
static | $oldNamespaces |
tests for includes/Html.php
Definition at line 4 of file HtmlTest.php.
Wrapper to easily set $wgHTML5 = false Original value will be restored after test completion.
Definition at line 74 of file HtmlTest.php.
Wrapper to easily set $wgHTML5 = true.
Original value will be restored after test completion.
Definition at line 65 of file HtmlTest.php.
Referenced by testDropDefaults(), and testHtmlElementAcceptsNewHtml5TypesInHtml5Mode().
Definition at line 417 of file HtmlTest.php.
References Html\element().
List of input element types values introduced by HTML5 Full list at http://www.w3.org/TR/html-markup/input.html.
Definition at line 384 of file HtmlTest.php.
HtmlTest::setUp | ( | ) |
Definition at line 11 of file HtmlTest.php.
References $wgContLang, $wgLang, and Language\factory().
Reimplemented from MediaWikiTestCase.
Definition at line 49 of file HtmlTest.php.
References $oldContLang, $oldHTML5, $oldLang, $oldLanguageCode, $wgContLang, and $wgLang.
Definition at line 341 of file HtmlTest.php.
References Html\namespaceSelector().
Definition at line 319 of file HtmlTest.php.
References Html\namespaceSelector().
HtmlTest::testDropDefaults | ( | $ | expected, |
$ | element, | ||
$ | message = '' |
||
) |
Test out Html::element drops default value Html::dropDefaults provideElementsWithAttributesHavingDefaultValues.
Definition at line 412 of file HtmlTest.php.
References enableHTML5().
Definition at line 96 of file HtmlTest.php.
References 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 154 of file HtmlTest.php.
References Html\expandAttributes().
Definition at line 79 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 205 of file HtmlTest.php.
References Html\expandAttributes().
Test for Html::expandAttributes() Please note it output a string prefixed with a space!
Definition at line 125 of file HtmlTest.php.
References Html\expandAttributes().
Definition at line 568 of file HtmlTest.php.
References Html\expandAttributes().
HtmlTest::testHtmlElementAcceptsNewHtml5TypesInHtml5Mode | ( | $ | HTML5InputType | ) |
Definition at line 240 of file HtmlTest.php.
References 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 229 of file HtmlTest.php.
References Html\expandAttributes().
HtmlTest::$oldContLang [static, private] |
Definition at line 6 of file HtmlTest.php.
Referenced by tearDown().
HtmlTest::$oldHTML5 [static, private] |
Definition at line 9 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.