MediaWiki  REL1_24
SanitizerTest Class Reference
Inheritance diagram for SanitizerTest:
Collaboration diagram for SanitizerTest:

List of all members.

Public Member Functions

 dataRemoveHTMLtags ()
 testAttributeSupport ($tag, $attributes, $expected, $message)
 provideAttributeSupport Sanitizer::fixTagAttributes
 testCssCommentsChecking ($expected, $css, $message= '')
 provideCssCommentsFixtures Sanitizer::checkCss
 testDecodeMixedComplexEntities ()
 Sanitizer::decodeCharReferences
 testDecodeMixedEntities ()
 Sanitizer::decodeCharReferences
 testDecodeNamedEntities ()
 Sanitizer::decodeCharReferences
 testDecodeNumericEntities ()
 Sanitizer::decodeCharReferences
 testDecodeTagAttributes ($expected, $attributes, $message= '')
 provideTagAttributesToDecode Sanitizer::decodeTagAttributes
 testDeprecatedAttributesUnaltered ($inputAttr, $inputEl, $message= '')
 provideDeprecatedAttributes Sanitizer::fixTagAttributes
 testInvalidAmpersand ()
 Sanitizer::decodeCharReferences
 testInvalidEntities ()
 Sanitizer::decodeCharReferences
 testInvalidNumberedEntities ()
 Sanitizer::decodeCharReferences
 testRemoveHTMLtags ($input, $output, $msg=null)
 dataRemoveHTMLtags Sanitizer::removeHTMLtags
 testRemovehtmltagsOnHtml5Tags ($tag, $escaped)
 Sanitizer::removeHTMLtags provideHtml5Tags

Static Public Member Functions

static provideAttributeSupport ()
 Test for support or lack of support for specific attributes in the attribute whitelist.
static provideCssCommentsFixtures ()
static provideDeprecatedAttributes ()
static provideHtml5Tags ()
 Provide HTML5 tags.
static provideTagAttributesToDecode ()

Protected Member Functions

 setUp ()

Detailed Description

Todo:
Tests covering decodeCharReferences can be refactored into a single method and dataprovider.

Definition at line 7 of file SanitizerTest.php.


Member Function Documentation

Definition at line 131 of file SanitizerTest.php.

References array().

Test for support or lack of support for specific attributes in the attribute whitelist.

Definition at line 326 of file SanitizerTest.php.

References array().

Definition at line 281 of file SanitizerTest.php.

References array().

Definition at line 253 of file SanitizerTest.php.

References array().

static SanitizerTest::provideHtml5Tags ( ) [static]

Provide HTML5 tags.

Definition at line 120 of file SanitizerTest.php.

References array().

Definition at line 181 of file SanitizerTest.php.

References array(), extensions, is, it, like, see, and some.

SanitizerTest::setUp ( ) [protected]

Reimplemented from MediaWikiTestCase.

Definition at line 9 of file SanitizerTest.php.

References AutoLoader\loadClass().

SanitizerTest::testAttributeSupport ( tag,
attributes,
expected,
message 
)

provideAttributeSupport Sanitizer::fixTagAttributes

Definition at line 343 of file SanitizerTest.php.

References Sanitizer\fixTagAttributes().

SanitizerTest::testCssCommentsChecking ( expected,
css,
message = '' 
)

provideCssCommentsFixtures Sanitizer::checkCss

Definition at line 274 of file SanitizerTest.php.

References $css, and Sanitizer\checkCss().

SanitizerTest::testDecodeTagAttributes ( expected,
attributes,
message = '' 
)

provideTagAttributesToDecode Sanitizer::decodeTagAttributes

Definition at line 174 of file SanitizerTest.php.

References Sanitizer\decodeTagAttributes().

SanitizerTest::testDeprecatedAttributesUnaltered ( inputAttr,
inputEl,
message = '' 
)

provideDeprecatedAttributes Sanitizer::fixTagAttributes

Definition at line 246 of file SanitizerTest.php.

References Sanitizer\fixTagAttributes().

SanitizerTest::testRemoveHTMLtags ( input,
output,
msg = null 
)

dataRemoveHTMLtags Sanitizer::removeHTMLtags

Definition at line 165 of file SanitizerTest.php.

References $GLOBALS, $output, and Sanitizer\removeHTMLtags().

Sanitizer::removeHTMLtags provideHtml5Tags

Parameters:
string$tagName of an HTML5 element (ie: 'video')
bool$escapedWhether sanitizer let the tag in or escape it (ie: '<video>')

Definition at line 101 of file SanitizerTest.php.

References array(), Sanitizer\removeHTMLtags(), and MediaWikiTestCase\setMwGlobals().


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