MediaWiki
REL1_22
|
Database Cache MessageCache More...
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. |
Database Cache MessageCache
Definition at line 8 of file MessageCacheTest.php.
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().
MessageCacheTest::configureLanguages | ( | ) | [protected] |
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.
string | $title | Title of page to be created |
string | $lang | Language and content of the created page |
string | null | $content | Content of the created page, or null for a generic string |
bool | $createSubPage | Set 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().
Definition at line 120 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().