MediaWiki  master
ParserTestResultNormalizer Class Reference

Static Public Member Functions

static normalize ($text, $funcs)
 

Public Attributes

 $invalid
 
 $xpath
 

Protected Member Functions

 __construct ($text)
 
 removeTbody ()
 
 serialize ()
 Serialize the XML DOM for comparison purposes. More...
 
 trimWhitespace ()
 The point of this function is to produce a normalized DOM in which Tidy's output matches the output of html5depurate. More...
 

Protected Attributes

 $doc
 

Detailed Description

Definition at line 1740 of file parserTest.inc.

Constructor & Destructor Documentation

ParserTestResultNormalizer::__construct (   $text)
protected

Definition at line 1754 of file parserTest.inc.

Member Function Documentation

static ParserTestResultNormalizer::normalize (   $text,
  $funcs 
)
static

Definition at line 1743 of file parserTest.inc.

References as.

Referenced by ParserTest\runTest().

ParserTestResultNormalizer::removeTbody ( )
protected

Definition at line 1770 of file parserTest.inc.

References as.

ParserTestResultNormalizer::serialize ( )
protected

Serialize the XML DOM for comparison purposes.

This does not generate HTML.

Definition at line 1815 of file parserTest.inc.

ParserTestResultNormalizer::trimWhitespace ( )
protected

The point of this function is to produce a normalized DOM in which Tidy's output matches the output of html5depurate.

Tidy both trims and pretty-prints, so this requires fairly aggressive treatment.

In particular, note that Tidy converts

x

to

\nx\n

, which theoretically affects display since the second line break is not ignored by compliant HTML parsers.

This function also removes empty elements, as does Tidy.

Definition at line 1792 of file parserTest.inc.

References as.

Member Data Documentation

ParserTestResultNormalizer::$doc
protected

Definition at line 1741 of file parserTest.inc.

ParserTestResultNormalizer::$invalid

Definition at line 1741 of file parserTest.inc.

ParserTestResultNormalizer::$xpath

Definition at line 1741 of file parserTest.inc.


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