MediaWiki  master
HtmlTest Class Reference
Inheritance diagram for HtmlTest:
Collaboration diagram for HtmlTest:

Public Member Functions

 dataXmlMimeType ()
 
 testCanDisableANamespaces ()
 Html::namespaceSelector More...
 
 testCanFilterOutNamespaces ()
 Html::namespaceSelector More...
 
 testDropDefaults ( $expected, $element, $attribs, $message='')
 Test out Html::element drops or enforces default value Html::dropDefaults provideElementsWithAttributesHavingDefaultValues. More...
 
 testElementBasics ()
 Html::element Html::rawElement Html::openElement Html::closeElement. More...
 
 testErrorBox ()
 Html::errorBox Html::messageBox More...
 
 testExpandAttributes_ArrayOnNonListValueAttribute_ThrowsException ()
 Html::expandAttributes MWException More...
 
 testExpandAttributesForBooleans ()
 Html::expandAttributes More...
 
 testExpandAttributesForNumbers ()
 Html::expandAttributes More...
 
 testExpandAttributesForObjects ()
 Html::expandAttributes More...
 
 testExpandAttributesListValueAttributes ()
 Html::expandAttributes has special features for HTML attributes that use space separated lists and also allows arrays to be used as values. More...
 
 testExpandAttributesSkipsNullAndFalse ()
 Html::expandAttributes More...
 
 testExpandAttributesSpaceSeparatedAttributesWithBoolean ()
 Test feature added by r96188, let pass attributes values as a PHP array. More...
 
 testExpandAttributesVariousExpansions ()
 Please note it output a string prefixed with a space! Html::expandAttributes. More...
 
 testHtmlElementAcceptsNewHtml5TypesInHtml5Mode ( $HTML5InputType)
 provideHtml5InputTypes Html::element More...
 
 testInlineScript ( $code, $expected, $error=false)
 provideInlineScript Html::inlineScript More...
 
 testNamespaceSelector ()
 Html::namespaceSelector Html::namespaceSelectorOptions More...
 
 testOpenElement ()
 PHPUnit_Framework_Error_Notice given element name with space Html::openElement. More...
 
 testSrcSet ( $images, $expected, $message)
 provideSrcSetImages Html::srcSet More...
 
 testSuccessBox ()
 Html::successBox Html::messageBox More...
 
 testValueIsAuthoritativeInSpaceSeparatedAttributesArrays ()
 How do we handle duplicate keys in HTML attributes expansion? We could pass a "class" the values: 'GREEN' and [ 'GREEN' => false ] The latter will take precedence. More...
 
 testWarningBox ()
 Html::warningBox Html::messageBox More...
 
 testWrapperCheck ()
 Html::check More...
 
 testWrapperInput ()
 Html::input More...
 
 testWrapperLabel ()
 Html::label More...
 
 testWrapperRadio ()
 Html::radio More...
 
 testXmlMimeType ( $mimetype, $isXmlMimeType)
 dataXmlMimeType Html::isXmlMimeType More...
 

Static Public Member Functions

static provideElementsWithAttributesHavingDefaultValues ()
 
static provideHtml5InputTypes ()
 List of input element types values introduced by HTML5 Full list at https://www.w3.org/TR/html-markup/input.html. More...
 
static provideInlineScript ()
 
static provideSrcSetImages ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Private Attributes

 $restoreWarnings
 

Detailed Description

Definition at line 3 of file HtmlTest.php.

Member Function Documentation

◆ dataXmlMimeType()

HtmlTest::dataXmlMimeType ( )

Definition at line 114 of file HtmlTest.php.

References false, and true.

◆ provideElementsWithAttributesHavingDefaultValues()

static HtmlTest::provideElementsWithAttributesHavingDefaultValues ( )
static

Definition at line 630 of file HtmlTest.php.

References $ret, as, false, and true.

◆ provideHtml5InputTypes()

static HtmlTest::provideHtml5InputTypes ( )
static

List of input element types values introduced by HTML5 Full list at https://www.w3.org/TR/html-markup/input.html.

Definition at line 597 of file HtmlTest.php.

References $type, and as.

◆ provideInlineScript()

static HtmlTest::provideInlineScript ( )
static

Definition at line 886 of file HtmlTest.php.

◆ provideSrcSetImages()

static HtmlTest::provideSrcSetImages ( )
static

Definition at line 852 of file HtmlTest.php.

◆ setUp()

HtmlTest::setUp ( )
protected

Definition at line 6 of file HtmlTest.php.

References Language\factory().

◆ tearDown()

HtmlTest::tearDown ( )
protected

Definition at line 68 of file HtmlTest.php.

References Language\factory().

◆ testCanDisableANamespaces()

HtmlTest::testCanDisableANamespaces ( )

Html::namespaceSelector

Definition at line 509 of file HtmlTest.php.

References Html\namespaceSelector().

◆ testCanFilterOutNamespaces()

HtmlTest::testCanFilterOutNamespaces ( )

Html::namespaceSelector

Definition at line 464 of file HtmlTest.php.

References Html\namespaceSelector().

◆ testDropDefaults()

HtmlTest::testDropDefaults (   $expected,
  $element,
  $attribs,
  $message = '' 
)

Test out Html::element drops or enforces default value Html::dropDefaults provideElementsWithAttributesHavingDefaultValues.

Definition at line 626 of file HtmlTest.php.

References $attribs, and Html\element().

◆ testElementBasics()

HtmlTest::testElementBasics ( )

◆ testErrorBox()

HtmlTest::testErrorBox ( )

Html::errorBox Html::messageBox

Definition at line 563 of file HtmlTest.php.

References Html\errorBox().

◆ testExpandAttributes_ArrayOnNonListValueAttribute_ThrowsException()

HtmlTest::testExpandAttributes_ArrayOnNonListValueAttribute_ThrowsException ( )

◆ testExpandAttributesForBooleans()

HtmlTest::testExpandAttributesForBooleans ( )

Html::expandAttributes

Definition at line 163 of file HtmlTest.php.

References Html\expandAttributes(), and null.

◆ testExpandAttributesForNumbers()

HtmlTest::testExpandAttributesForNumbers ( )

Html::expandAttributes

Definition at line 190 of file HtmlTest.php.

References Html\expandAttributes().

◆ testExpandAttributesForObjects()

HtmlTest::testExpandAttributesForObjects ( )

Html::expandAttributes

Definition at line 206 of file HtmlTest.php.

References Html\expandAttributes().

◆ testExpandAttributesListValueAttributes()

HtmlTest::testExpandAttributesListValueAttributes ( )

Html::expandAttributes has special features for HTML attributes that use space separated lists and also allows arrays to be used as values.

Html::expandAttributes

Definition at line 248 of file HtmlTest.php.

References Html\expandAttributes(), and null.

◆ testExpandAttributesSkipsNullAndFalse()

HtmlTest::testExpandAttributesSkipsNullAndFalse ( )

Html::expandAttributes

Definition at line 143 of file HtmlTest.php.

References Html\expandAttributes(), and null.

◆ testExpandAttributesSpaceSeparatedAttributesWithBoolean()

HtmlTest::testExpandAttributesSpaceSeparatedAttributesWithBoolean ( )

Test feature added by r96188, let pass attributes values as a PHP array.

Restricted to class,rel, accesskey. Html::expandAttributes

Definition at line 300 of file HtmlTest.php.

References Html\expandAttributes(), null, use, values, and well.

◆ testExpandAttributesVariousExpansions()

HtmlTest::testExpandAttributesVariousExpansions ( )

Please note it output a string prefixed with a space! Html::expandAttributes.

Definition at line 218 of file HtmlTest.php.

References Html\expandAttributes().

◆ testHtmlElementAcceptsNewHtml5TypesInHtml5Mode()

HtmlTest::testHtmlElementAcceptsNewHtml5TypesInHtml5Mode (   $HTML5InputType)

provideHtml5InputTypes Html::element

Definition at line 540 of file HtmlTest.php.

References Html\element().

◆ testInlineScript()

HtmlTest::testInlineScript (   $code,
  $expected,
  $error = false 
)

provideInlineScript Html::inlineScript

Definition at line 930 of file HtmlTest.php.

References $code, and Html\inlineScript().

◆ testNamespaceSelector()

HtmlTest::testNamespaceSelector ( )

◆ testOpenElement()

HtmlTest::testOpenElement ( )

PHPUnit_Framework_Error_Notice given element name with space Html::openElement.

Definition at line 84 of file HtmlTest.php.

References Html\openElement().

◆ testSrcSet()

HtmlTest::testSrcSet (   $images,
  $expected,
  $message 
)

provideSrcSetImages Html::srcSet

Definition at line 882 of file HtmlTest.php.

References Html\srcSet().

◆ testSuccessBox()

HtmlTest::testSuccessBox ( )

Html::successBox Html::messageBox

Definition at line 582 of file HtmlTest.php.

References Html\successBox().

◆ testValueIsAuthoritativeInSpaceSeparatedAttributesArrays()

HtmlTest::testValueIsAuthoritativeInSpaceSeparatedAttributesArrays ( )

How do we handle duplicate keys in HTML attributes expansion? We could pass a "class" the values: 'GREEN' and [ 'GREEN' => false ] The latter will take precedence.

Feature added by r96188 Html::expandAttributes

Definition at line 325 of file HtmlTest.php.

References Html\expandAttributes().

◆ testWarningBox()

HtmlTest::testWarningBox ( )

Html::warningBox Html::messageBox

Definition at line 552 of file HtmlTest.php.

References Html\warningBox().

◆ testWrapperCheck()

HtmlTest::testWrapperCheck ( )

Html::check

Definition at line 802 of file HtmlTest.php.

References Html\check().

◆ testWrapperInput()

HtmlTest::testWrapperInput ( )

Html::input

Definition at line 786 of file HtmlTest.php.

References Html\input().

◆ testWrapperLabel()

HtmlTest::testWrapperLabel ( )

Html::label

Definition at line 844 of file HtmlTest.php.

References Html\label().

◆ testWrapperRadio()

HtmlTest::testWrapperRadio ( )

Html::radio

Definition at line 823 of file HtmlTest.php.

References Html\radio().

◆ testXmlMimeType()

HtmlTest::testXmlMimeType (   $mimetype,
  $isXmlMimeType 
)

dataXmlMimeType Html::isXmlMimeType

Definition at line 136 of file HtmlTest.php.

References Html\isXmlMimeType().

Member Data Documentation

◆ $restoreWarnings

HtmlTest::$restoreWarnings
private

Definition at line 4 of file HtmlTest.php.


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