MediaWiki  REL1_22
MessageCacheTest Class Reference

Database Cache MessageCache More...

Inheritance diagram for MessageCacheTest:
Collaboration diagram for MessageCacheTest:

List of all members.

Public Member Functions

 addDBData ()
 Stub.
 provideMessagesForFallback ()
 provideMessagesForFullKeys ()
 testFullKeyBehaviour ($message, $lang, $expectedContent)
 There's a fallback case where the message key is given as fully qualified -- this should ignore the passed $lang and use the language from the key.
 testMessageFallbacks ($message, $lang, $expectedContent)
 Test message fallbacks, bug #1495.

Protected Member Functions

 configureLanguages ()
 Helper function -- setup site language for testing.
 makePage ($title, $lang, $content=null, $createSubPage=true)
 Helper function for addDBData -- adds a simple page to the database.
 setUp ()
 setUp and tearDown should (where significant) happen in reverse order.

Detailed Description

Database Cache MessageCache

Definition at line 8 of file MessageCacheTest.php.


Member Function Documentation

Stub.

If a test needs to add additional data to the database, it should implement this method and do so

Reimplemented from MediaWikiTestCase.

Definition at line 32 of file MessageCacheTest.php.

References configureLanguages(), and makePage().

Helper function -- setup site language for testing.

Definition at line 19 of file MessageCacheTest.php.

References array(), Language\factory(), and MediaWikiTestCase\setMwGlobals().

Referenced by addDBData(), and setUp().

MessageCacheTest::makePage ( title,
lang,
content = null,
createSubPage = true 
) [protected]

Helper function for addDBData -- adds a simple page to the database.

Parameters:
string$titleTitle of page to be created
string$langLanguage and content of the created page
string | null$contentContent of the created page, or null for a generic string
bool$createSubPageSet to false if a root page should be created

Definition at line 66 of file MessageCacheTest.php.

References $title, $wgContLang, global, ContentHandler\makeContent(), and Title\newFromText().

Referenced by addDBData().

Definition at line 92 of file MessageCacheTest.php.

References array().

MessageCacheTest::setUp ( ) [protected]

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

Reimplemented from MediaWikiLangTestCase.

Definition at line 10 of file MessageCacheTest.php.

References configureLanguages(), and MessageCache\singleton().

MessageCacheTest::testFullKeyBehaviour ( message,
lang,
expectedContent 
)

There's a fallback case where the message key is given as fully qualified -- this should ignore the passed $lang and use the language from the key.

provideMessagesForFullKeys

Definition at line 115 of file MessageCacheTest.php.

References $result, and MessageCache\singleton().

MessageCacheTest::testMessageFallbacks ( message,
lang,
expectedContent 
)

Test message fallbacks, bug #1495.

provideMessagesForFallback

Definition at line 87 of file MessageCacheTest.php.

References $result, and MessageCache\singleton().


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