MediaWiki  master
PreprocessorTest Class Reference

Preprocessor. More...

Inheritance diagram for PreprocessorTest:
Collaboration diagram for PreprocessorTest:

Public Member Functions

 getStripList ()
 
 testHeadings ( $className, $wikiText, $expectedXml)
 provideHeadings More...
 
 testPreprocessorOutput ( $className, $wikiText, $expectedXml)
 provideCases More...
 
 testPreprocessorOutputFiles ( $className, $filename)
 provideFiles More...
 

Static Public Member Functions

static provideCases ()
 
static provideFiles ()
 These are more complex test cases taken out of wiki articles. More...
 
static provideHeadings ()
 Tests from T30642 · https://phabricator.wikimedia.org/T30642. More...
 

Protected Member Functions

 normalizeXml ( $xml)
 Normalize XML string to the form that a DOMDocument saves out. More...
 
 preprocessToXml ( $className, $wikiText)
 Get XML preprocessor tree from the preprocessor (which may not be the native XML-based one). More...
 
 setUp ()
 

Static Protected Member Functions

static addClassArg ( $testCases)
 

Protected Attributes

ParserOptions $mOptions
 
 $mPPNodeCount = 0
 
array $mPreprocessors
 
 $mTitle = 'Page title'
 

Static Protected Attributes

static $classNames
 

Detailed Description

Member Function Documentation

◆ addClassArg()

static PreprocessorTest::addClassArg (   $testCases)
staticprotected

Definition at line 64 of file PreprocessorTest.php.

References as.

◆ getStripList()

PreprocessorTest::getStripList ( )

Definition at line 60 of file PreprocessorTest.php.

◆ normalizeXml()

PreprocessorTest::normalizeXml (   $xml)
protected

Normalize XML string to the form that a DOMDocument saves out.

Parameters
string$xml
Returns
string

Definition at line 195 of file PreprocessorTest.php.

Referenced by preprocessToXml(), testHeadings(), testPreprocessorOutput(), and testPreprocessorOutputFiles().

◆ preprocessToXml()

PreprocessorTest::preprocessToXml (   $className,
  $wikiText 
)
protected

Get XML preprocessor tree from the preprocessor (which may not be the native XML-based one).

Parameters
string$className
string$wikiText
Returns
string

Definition at line 175 of file PreprocessorTest.php.

References normalizeXml().

Referenced by testHeadings(), testPreprocessorOutput(), and testPreprocessorOutputFiles().

◆ provideCases()

static PreprocessorTest::provideCases ( )
static

Definition at line 75 of file PreprocessorTest.php.

◆ provideFiles()

static PreprocessorTest::provideFiles ( )
static

These are more complex test cases taken out of wiki articles.

Definition at line 215 of file PreprocessorTest.php.

References https.

◆ provideHeadings()

static PreprocessorTest::provideHeadings ( )
static

Tests from T30642 · https://phabricator.wikimedia.org/T30642.

Definition at line 249 of file PreprocessorTest.php.

◆ setUp()

PreprocessorTest::setUp ( )
protected

Definition at line 46 of file PreprocessorTest.php.

References as, and ParserOptions\newFromUserAndLang().

◆ testHeadings()

PreprocessorTest::testHeadings (   $className,
  $wikiText,
  $expectedXml 
)

provideHeadings

Definition at line 295 of file PreprocessorTest.php.

References normalizeXml(), and preprocessToXml().

◆ testPreprocessorOutput()

PreprocessorTest::testPreprocessorOutput (   $className,
  $wikiText,
  $expectedXml 
)

provideCases

Definition at line 207 of file PreprocessorTest.php.

References normalizeXml(), and preprocessToXml().

◆ testPreprocessorOutputFiles()

PreprocessorTest::testPreprocessorOutputFiles (   $className,
  $filename 
)

provideFiles

Definition at line 230 of file PreprocessorTest.php.

References $output, normalizeXml(), and preprocessToXml().

Member Data Documentation

◆ $classNames

PreprocessorTest::$classNames
staticprotected
Initial value:

Definition at line 41 of file PreprocessorTest.php.

◆ $mOptions

ParserOptions PreprocessorTest::$mOptions
protected

Definition at line 35 of file PreprocessorTest.php.

◆ $mPPNodeCount

PreprocessorTest::$mPPNodeCount = 0
protected

Definition at line 31 of file PreprocessorTest.php.

◆ $mPreprocessors

array PreprocessorTest::$mPreprocessors
protected

Definition at line 39 of file PreprocessorTest.php.

◆ $mTitle

PreprocessorTest::$mTitle = 'Page title'
protected

Definition at line 30 of file PreprocessorTest.php.


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