MediaWiki  REL1_20
HtmlTest Class Reference

tests for includes/Html.php More...

Inheritance diagram for HtmlTest:
Collaboration diagram for HtmlTest:

List of all members.

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

Detailed Description

tests for includes/Html.php

Definition at line 4 of file HtmlTest.php.


Member Function Documentation

Wrapper to easily set $wgHTML5 = false Original value will be restored after test completion.

Todo:
Move to MediaWikiTestCase

Definition at line 74 of file HtmlTest.php.

Wrapper to easily set $wgHTML5 = true.

Original value will be restored after test completion.

Todo:
Move to MediaWikiTestCase

Definition at line 65 of file HtmlTest.php.

Referenced by testDropDefaults(), and testHtmlElementAcceptsNewHtml5TypesInHtml5Mode().

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.

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.

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().

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().

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().

providesHtml5InputTypes

Definition at line 371 of file HtmlTest.php.

References enableHTML5().

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().


Member Data Documentation

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.


The documentation for this class was generated from the following file: