MediaWiki  master
ParserMethodsTest Class Reference

Database Parser BlockLevelPass. More...

Inheritance diagram for ParserMethodsTest:
Collaboration diagram for ParserMethodsTest:

Public Member Functions

 helperParserFunc ( $input, $args, $parser)
 
 provideRevisionAccess ()
 
 testCallParserFunction ()
 
 testGetSections ()
 Parser ParserOutput::getSections. More...
 
 testGuessSectionNameFromWikiText ( $input, $mode, $expected)
 provideGuessSectionNameFromWikiText More...
 
 testNormalizeLinkUrl ( $explanation, $url, $expected)
 provideNormalizeLinkUrl More...
 
 testPreSaveTransform ( $text, $expected)
 providePreSaveTransform More...
 
 testRecursiveParse ()
 MWException Parser state cleared while parsing. More...
 
 testRevisionAccess ( $text, ParserOptions $po, $revId, $expectedInHtml, $expectedInPst=null)
 provideRevisionAccess More...
 
 testStripOuterParagraph ( $text, $expected)
 provideStripOuterParagraph More...
 
 testWrapOutput ()
 

Static Public Member Functions

static provideGuessSectionNameFromWikiText ()
 
static provideNormalizeLinkUrl ()
 
static providePreSaveTransform ()
 
static provideStripOuterParagraph ()
 

Private Member Functions

 getMockTitle ( $name)
 

Additional Inherited Members

- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()
 

Detailed Description

Database Parser BlockLevelPass.

Definition at line 14 of file ParserMethodsTest.php.

Member Function Documentation

◆ getMockTitle()

ParserMethodsTest::getMockTitle (   $name)
private
Parameters
string$name
Returns
Title

Definition at line 212 of file ParserMethodsTest.php.

References $name, $title, class, and Language\factory().

Referenced by provideRevisionAccess(), and testRevisionAccess().

◆ helperParserFunc()

ParserMethodsTest::helperParserFunc (   $input,
  $args,
  $parser 
)

Definition at line 89 of file ParserMethodsTest.php.

References $input, $parser, $title, and Title\newFromText().

◆ provideGuessSectionNameFromWikiText()

static ParserMethodsTest::provideGuessSectionNameFromWikiText ( )
static

Definition at line 381 of file ParserMethodsTest.php.

◆ provideNormalizeLinkUrl()

static ParserMethodsTest::provideNormalizeLinkUrl ( )
static

Definition at line 161 of file ParserMethodsTest.php.

◆ providePreSaveTransform()

static ParserMethodsTest::providePreSaveTransform ( )
static

Definition at line 16 of file ParserMethodsTest.php.

◆ provideRevisionAccess()

ParserMethodsTest::provideRevisionAccess ( )

Definition at line 224 of file ParserMethodsTest.php.

References $title, class, getMockTitle(), null, and use.

◆ provideStripOuterParagraph()

static ParserMethodsTest::provideStripOuterParagraph ( )
static

Definition at line 41 of file ParserMethodsTest.php.

◆ testCallParserFunction()

ParserMethodsTest::testCallParserFunction ( )

Definition at line 96 of file ParserMethodsTest.php.

References $parser, $ret, $title, Title\newFromText(), and Parser\OT_HTML.

◆ testGetSections()

ParserMethodsTest::testGetSections ( )

◆ testGuessSectionNameFromWikiText()

ParserMethodsTest::testGuessSectionNameFromWikiText (   $input,
  $mode,
  $expected 
)

provideGuessSectionNameFromWikiText

Definition at line 389 of file ParserMethodsTest.php.

References $input.

◆ testNormalizeLinkUrl()

ParserMethodsTest::testNormalizeLinkUrl (   $explanation,
  $url,
  $expected 
)

provideNormalizeLinkUrl

Definition at line 157 of file ParserMethodsTest.php.

References Parser\normalizeLinkUrl().

◆ testPreSaveTransform()

ParserMethodsTest::testPreSaveTransform (   $text,
  $expected 
)

providePreSaveTransform

Definition at line 30 of file ParserMethodsTest.php.

References $title, $user, Title\newFromText(), ParserOptions\newFromUser(), and User.

◆ testRecursiveParse()

ParserMethodsTest::testRecursiveParse ( )

MWException Parser state cleared while parsing.

Did you call Parser::parse recursively?

Definition at line 81 of file ParserMethodsTest.php.

References $parser, $title, and Title\newFromText().

◆ testRevisionAccess()

ParserMethodsTest::testRevisionAccess (   $text,
ParserOptions  $po,
  $revId,
  $expectedInHtml,
  $expectedInPst = null 
)

provideRevisionAccess

Definition at line 325 of file ParserMethodsTest.php.

References $html, $parser, $title, class, ParserOptions\enableLimitReport(), getMockTitle(), ParserOptions\getUser(), and null.

◆ testStripOuterParagraph()

ParserMethodsTest::testStripOuterParagraph (   $text,
  $expected 
)

provideStripOuterParagraph

Definition at line 72 of file ParserMethodsTest.php.

References Parser\stripOuterParagraph().

◆ testWrapOutput()

ParserMethodsTest::testWrapOutput ( )

Definition at line 196 of file ParserMethodsTest.php.

References $parser, $title, and Title\newFromText().


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