MediaWiki  master
WikitextContentTest Class Reference

ContentHandler. More...

Inheritance diagram for WikitextContentTest:
Collaboration diagram for WikitextContentTest:

Public Member Functions

 newContent ( $text)
 
 testAddSectionHeader ()
 WikitextContent::addSectionHeader More...
 
 testGetContentHandler ()
 WikitextContent::getContentHandler. More...
 
 testGetModel ()
 WikitextContent::getModel. More...
 
 testGetSecondaryDataUpdates ( $title, $model, $text, $expectedStuff)
 dataGetSecondaryDataUpdates Database WikitextContent::getSecondaryDataUpdates More...
 
 testGetSection ( $text, $sectionId, $expectedText)
 dataGetSection WikitextContent::getSection More...
 
 testHadSignature ()
 WikitextContent::preSaveTransform WikitextContent::fillParserOutput. More...
 
 testMatchMagicWord ()
 WikitextContent::matchMagicWord. More...
 
 testRedirectParserOption ()
 ParserOptions::getRedirectTarget ParserOptions::setRedirectTarget. More...
 
 testReplaceSection ( $text, $section, $with, $sectionTitle, $expected)
 dataReplaceSection WikitextContent::replaceSection More...
 
 testUpdateRedirect ()
 WikitextContent::updateRedirect. More...
 
- Public Member Functions inherited from TextContentTest
 newContent ( $text)
 
 testConvert ( $text, $model, $lossy, $expectedNative)
 provideConvert TextContent::convert More...
 
 testCopy ()
 TextContent::copy. More...
 
 testDeletionUpdates ( $model, $text, $expectedStuff)
 dataGetDeletionUpdates TextContent::getDeletionUpdates More...
 
 testEquals (Content $a, Content $b=null, $equal=false)
 dataEquals TextContent::equals More...
 
 testGetContentHandler ()
 TextContent::getContentHandler. More...
 
 testGetModel ()
 TextContent::getModel. More...
 
 testGetNativeData ()
 TextContent::getNativeData. More...
 
 testGetParserOutput ( $title, $model, $text, $expectedHtml, $expectedFields=null)
 dataGetParserOutput TextContent::getParserOutput More...
 
 testGetRedirectTarget ( $text, $expected)
 dataGetRedirectTarget TextContent::getRedirectTarget More...
 
 testGetSize ()
 TextContent::getSize. More...
 
 testGetText ()
 TextContent::getText. More...
 
 testGetTextForSearchIndex ()
 TextContent::getTextForSearchIndex. More...
 
 testGetTextForSummary ( $text, $maxlength, $expected)
 dataGetTextForSummary TextContent::getTextForSummary More...
 
 testGetWikitextForTransclusion ()
 TextContent::getWikitextForTransclusion. More...
 
 testIsCountable ( $text, $hasLinks, $mode, $expected)
 dataIsCountable TextContent::isCountable More...
 
 testIsEmpty ( $text, $empty)
 dataIsEmpty TextContent::isEmpty More...
 
 testIsRedirect ( $text, $expected)
 dataGetRedirectTarget TextContent::isRedirect More...
 
 testNormalizeLineEndings ( $input, $expected)
 TextContent::normalizeLineEndings provideNormalizeLineEndings More...
 
 testPreloadTransform ( $text, $expected)
 dataPreloadTransform TextContent::preloadTransform More...
 
 testPreSaveTransform ( $text, $expected)
 dataPreSaveTransform TextContent::preSaveTransform More...
 
 testSerialize ()
 TextContent::__construct TextContentHandler::serializeContent More...
 

Static Public Member Functions

static dataEquals ()
 
static dataGetDeletionUpdates ()
 
static dataGetParserOutput ()
 
static dataGetRedirectTarget ()
 
static dataGetSecondaryDataUpdates ()
 
static dataGetSection ()
 
static dataGetTextForSummary ()
 
static dataIsCountable ()
 
static dataPreloadTransform ()
 
static dataPreSaveTransform ()
 
static dataReplaceSection ()
 
- Static Public Member Functions inherited from TextContentTest
static dataEquals ()
 
static dataGetDeletionUpdates ()
 
static dataGetParserOutput ()
 
static dataGetRedirectTarget ()
 
static dataGetTextForSummary ()
 
static dataIsCountable ()
 
static dataIsEmpty ()
 
static dataPreloadTransform ()
 
static dataPreSaveTransform ()
 
static provideConvert ()
 
static provideNormalizeLineEndings ()
 

Static Public Attributes

static $sections
 

Additional Inherited Members

- Protected Member Functions inherited from TextContentTest
 setUp ()
 
 tearDown ()
 
- Protected Member Functions inherited from MediaWikiLangTestCase
 setUp ()
 
- Protected Attributes inherited from TextContentTest
 $context
 

Detailed Description

ContentHandler.

Database ^— needed, because we do need the database to test link updates

Definition at line 11 of file WikitextContentTest.php.

Member Function Documentation

◆ dataEquals()

static WikitextContentTest::dataEquals ( )
static

Definition at line 427 of file WikitextContentTest.php.

References false, null, and true.

◆ dataGetDeletionUpdates()

static WikitextContentTest::dataGetDeletionUpdates ( )
static

Definition at line 437 of file WikitextContentTest.php.

References class, and CONTENT_MODEL_WIKITEXT.

◆ dataGetParserOutput()

static WikitextContentTest::dataGetParserOutput ( )
static

Definition at line 28 of file WikitextContentTest.php.

References CONTENT_MODEL_WIKITEXT.

◆ dataGetRedirectTarget()

static WikitextContentTest::dataGetRedirectTarget ( )
static

Definition at line 229 of file WikitextContentTest.php.

◆ dataGetSecondaryDataUpdates()

static WikitextContentTest::dataGetSecondaryDataUpdates ( )
static

Definition at line 40 of file WikitextContentTest.php.

References class, and CONTENT_MODEL_WIKITEXT.

◆ dataGetSection()

static WikitextContentTest::dataGetSection ( )
static

Definition at line 106 of file WikitextContentTest.php.

◆ dataGetTextForSummary()

static WikitextContentTest::dataGetTextForSummary ( )
static

Definition at line 243 of file WikitextContentTest.php.

◆ dataIsCountable()

static WikitextContentTest::dataIsCountable ( )
static

Definition at line 260 of file WikitextContentTest.php.

◆ dataPreloadTransform()

static WikitextContentTest::dataPreloadTransform ( )
static

Definition at line 216 of file WikitextContentTest.php.

◆ dataPreSaveTransform()

static WikitextContentTest::dataPreSaveTransform ( )
static

Definition at line 201 of file WikitextContentTest.php.

◆ dataReplaceSection()

static WikitextContentTest::dataReplaceSection ( )
static

Definition at line 141 of file WikitextContentTest.php.

◆ newContent()

WikitextContentTest::newContent (   $text)

Definition at line 24 of file WikitextContentTest.php.

◆ testAddSectionHeader()

WikitextContentTest::testAddSectionHeader ( )

◆ testGetContentHandler()

WikitextContentTest::testGetContentHandler ( )

◆ testGetModel()

WikitextContentTest::testGetModel ( )

◆ testGetSecondaryDataUpdates()

WikitextContentTest::testGetSecondaryDataUpdates (   $title,
  $model,
  $text,
  $expectedStuff 
)

◆ testGetSection()

WikitextContentTest::testGetSection (   $text,
  $sectionId,
  $expectedText 
)

dataGetSection WikitextContent::getSection

Definition at line 128 of file WikitextContentTest.php.

◆ testHadSignature()

WikitextContentTest::testHadSignature ( )

◆ testMatchMagicWord()

WikitextContentTest::testMatchMagicWord ( )

◆ testRedirectParserOption()

WikitextContentTest::testRedirectParserOption ( )

◆ testReplaceSection()

WikitextContentTest::testReplaceSection (   $text,
  $section,
  $with,
  $sectionTitle,
  $expected 
)

dataReplaceSection WikitextContent::replaceSection

Definition at line 183 of file WikitextContentTest.php.

◆ testUpdateRedirect()

WikitextContentTest::testUpdateRedirect ( )

Member Data Documentation

◆ $sections

WikitextContentTest::$sections
static
Initial value:
= "Intro
== stuff ==
hello world
== test ==
just a test
== foo ==
more stuff
"

Definition at line 12 of file WikitextContentTest.php.

Referenced by JavaScriptContentTest\dataGetSection(), and JavaScriptContentTest\dataReplaceSection().


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