MediaWiki  REL1_22
ContentHandlerTest Class Reference

ContentHandler Database More...

Inheritance diagram for ContentHandlerTest:
Collaboration diagram for ContentHandlerTest:

List of all members.

Public Member Functions

 setUp ()
 setUp and tearDown should (where significant) happen in reverse order.
 tearDown ()
 testGetContentText_NonTextContent_fail ()
 ContentHandler::getContentText should have thrown an exception for non-text Content object MWException ContentHandler::getContentText.
 testGetContentText_NonTextContent_ignore ()
 ContentHandler::getContentText
 testGetContentText_NonTextContent_serialize ()
 ContentHandler::getContentText
 testGetContentText_Null ($contentHandlerTextFallback)
 dataGetContentText_Null ContentHandler::getContentText
 testGetContentText_TextContent ($contentHandlerTextFallback)
 dataGetContentText_TextContent ContentHandler::getContentText
 testGetDefaultModelFor ($title, $expectedModelId)
 dataGetDefaultModelFor ContentHandler::getDefaultModelFor
 testGetForTitle ($title, $expectedContentModel)
 dataGetDefaultModelFor ContentHandler::getForTitle
 testGetLocalizedName ($id, $expected)
 dataGetLocalizedName ContentHandler::getLocalizedName
 testGetPageLanguage ($title, $expected)
 dataGetPageLanguage ContentHandler::getPageLanguage
 testMakeContent ($data, $title, $modelId, $format, $expectedModelId, $expectedNativeData, $shouldFail)
 dataMakeContent ContentHandler::makeContent
 testRunLegacyHooks ()
 ContentHandler::runLegacyHooks

Static Public Member Functions

static dataGetContentText_Null ()
static dataGetContentText_TextContent ()
static dataGetDefaultModelFor ()
static dataGetLocalizedName ()
static dataGetPageLanguage ()
static dataMakeContent ()
static dummyHookHandler ($foo, &$text, $bar)

Detailed Description

ContentHandler Database

Note:
Declare that we are using the database, because otherwise we'll fail in the "databaseless" test run. This is because the LinkHolderArray used by the parser needs database access.

Definition at line 11 of file ContentHandlerTest.php.


Member Function Documentation

Definition at line 152 of file ContentHandlerTest.php.

References array().

Definition at line 173 of file ContentHandlerTest.php.

References array().

Definition at line 51 of file ContentHandlerTest.php.

References array().

Definition at line 90 of file ContentHandlerTest.php.

References array().

Definition at line 119 of file ContentHandlerTest.php.

References array(), and global.

Definition at line 235 of file ContentHandlerTest.php.

References array().

static ContentHandlerTest::dummyHookHandler ( foo,
&$  text,
bar 
) [static]

Definition at line 300 of file ContentHandlerTest.php.

setUp and tearDown should (where significant) happen in reverse order.

Reimplemented from MediaWikiTestCase.

Definition at line 13 of file ContentHandlerTest.php.

References $wgContLang, array(), MWNamespace\getCanonicalNamespaces(), global, and MediaWikiTestCase\setMwGlobals().

ContentHandlerTest::testGetContentText_Null ( contentHandlerTextFallback)
ContentHandlerTest::testGetContentText_TextContent ( contentHandlerTextFallback)

dataGetContentText_TextContent ContentHandler::getContentText

Definition at line 185 of file ContentHandlerTest.php.

References ContentHandler\getContentText(), and MediaWikiTestCase\setMwGlobals().

ContentHandlerTest::testGetDefaultModelFor ( title,
expectedModelId 
)
ContentHandlerTest::testGetForTitle ( title,
expectedContentModel 
)

dataGetDefaultModelFor ContentHandler::getForTitle

Definition at line 84 of file ContentHandlerTest.php.

References $title, ContentHandler\getForTitle(), and Title\newFromText().

ContentHandlerTest::testGetLocalizedName ( id,
expected 
)

dataGetLocalizedName ContentHandler::getLocalizedName

Definition at line 104 of file ContentHandlerTest.php.

References $name, and ContentHandler\getLocalizedName().

ContentHandlerTest::testMakeContent ( data,
title,
modelId,
format,
expectedModelId,
expectedNativeData,
shouldFail 
)

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