MediaWiki  REL1_19
HtmlTest Class Reference

tests for includes/Html.php More...

Inheritance diagram for HtmlTest:
Collaboration diagram for HtmlTest:

List of all members.

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

Detailed Description

tests for includes/Html.php

Definition at line 4 of file HtmlTest.php.


Member Function Documentation

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.

Parameters:
String$expectedId<select> id attribute value
String$expectedName<select> name attribute value
String$htmlOutput of a call to Html::namespaceSelector()
String$msgOptional message (default: '')

Definition at line 310 of file HtmlTest.php.

Referenced by testNamespaceSelectorIdAndNameDefaultsAttributes().

Here is the caller graph for this function:

Definition at line 10 of file HtmlTest.php.

References $wgContLang, $wgLang, $wgLanguageCode, and Language\factory().

Here is the call graph for this function:

Definition at line 70 of file HtmlTest.php.

References $wgHtml5, and Html\expandAttributes().

Here is the call graph for this function:

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

Here is the call graph for this function:

Definition at line 53 of file HtmlTest.php.

References Html\expandAttributes().

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

Definition at line 333 of file HtmlTest.php.

References Html\expandAttributes().

Here is the call graph for this function:

Definition at line 214 of file HtmlTest.php.

References Html\namespaceSelector().

Here is the call graph for this function:

Definition at line 262 of file HtmlTest.php.

References assertNsSelectorIdAndName(), and Html\namespaceSelector().

Here is the call graph for this function:

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

Here is the call graph for this function:


Member Data Documentation

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.


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