MediaWiki  REL1_22
TitleTest Class Reference

Database ^--- needed for language cache stuff More...

Inheritance diagram for TitleTest:
Collaboration diagram for TitleTest:

List of all members.

Public Member Functions

 dataTestIsValidMoveOperation ()
 Provides test parameter values for testIsValidMoveOperation()
 dataWgWhitelistReadRegexp ()
 Provides test parameter values for testWgWhitelistReadRegexp()
 flattenErrorsArray ($errors)
 testBug31100FixSpecialName ($text, $expectedParam)
 provideBug31100 Title::fixSpecialName
 testConvertByteClassToUnicodeClass ($byteClass, $unicodeClass)
 provideConvertByteClassToUnicodeClass Title::convertByteClassToUnicodeClass
 testGetBaseText ($title, $expected, $msg= '')
 provideBaseTitleCases Title::getBaseText
 testGetPageViewLanguage ($expected, $titleText, $contLang, $lang, $variant, $msg= '')
 provideGetPageViewLanguage Title::getPageViewLanguage
 testGetRootText ($title, $expected, $msg= '')
 provideRootTitleCases Title::getRootText
 testGetSubpageText ($title, $expected, $msg= '')
 testIsValidMoveOperation ($source, $target, $expected)
 Auth-less test of Title::isValidMoveOperation.
 testLegalChars ()
 Title::legalChars
 testSecureAndSplit ()
 See also mediawiki.Title.test.js Title::secureAndSplit.
 testWgWhitelistReadRegexp ($whitelistRegexp, $source, $action, $expected)
 Auth-less test of Title::userCan.

Static Public Member Functions

static provideBaseTitleCases ()
static provideBug31100 ()
static provideConvertByteClassToUnicodeClass ()
static provideGetPageViewLanguage ()
static provideRootTitleCases ()
static provideSubpageTitleCases ()
static provideTestIsValidMoveOperation ()

Protected Member Functions

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

Detailed Description

Database ^--- needed for language cache stuff

Definition at line 7 of file TitleTest.php.


Member Function Documentation

Provides test parameter values for testIsValidMoveOperation()

Definition at line 235 of file TitleTest.php.

References array().

Provides test parameter values for testWgWhitelistReadRegexp()

Definition at line 310 of file TitleTest.php.

References array().

Definition at line 346 of file TitleTest.php.

References $error, $result, array(), and as.

Referenced by testIsValidMoveOperation(), and testWgWhitelistReadRegexp().

static TitleTest::provideBaseTitleCases ( ) [static]

Definition at line 437 of file TitleTest.php.

References array(), and message.

static TitleTest::provideBug31100 ( ) [static]

Definition at line 200 of file TitleTest.php.

References array().

Definition at line 115 of file TitleTest.php.

References array().

Definition at line 386 of file TitleTest.php.

References array().

static TitleTest::provideRootTitleCases ( ) [static]

Definition at line 457 of file TitleTest.php.

References array(), and message.

Definition at line 478 of file TitleTest.php.

References array(), and message.

Definition at line 355 of file TitleTest.php.

References array().

TitleTest::setUp ( ) [protected]

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

Reimplemented from MediaWikiTestCase.

Definition at line 8 of file TitleTest.php.

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

TitleTest::testBug31100FixSpecialName ( text,
expectedParam 
)

provideBug31100 Title::fixSpecialName

Definition at line 188 of file TitleTest.php.

References $title, and Title\newFromText().

TitleTest::testConvertByteClassToUnicodeClass ( byteClass,
unicodeClass 
)

provideConvertByteClassToUnicodeClass Title::convertByteClassToUnicodeClass

Definition at line 180 of file TitleTest.php.

References Title\convertByteClassToUnicodeClass().

TitleTest::testGetBaseText ( title,
expected,
msg = '' 
)

provideBaseTitleCases Title::getBaseText

Definition at line 429 of file TitleTest.php.

References $title, and Title\newFromText().

TitleTest::testGetPageViewLanguage ( expected,
titleText,
contLang,
lang,
variant,
msg = '' 
)

provideGetPageViewLanguage Title::getPageViewLanguage

Definition at line 366 of file TitleTest.php.

References $title, $wgContLang, $wgLang, Language\factory(), global, and Title\newFromText().

TitleTest::testGetRootText ( title,
expected,
msg = '' 
)

provideRootTitleCases Title::getRootText

Definition at line 449 of file TitleTest.php.

References $title, and Title\newFromText().

TitleTest::testGetSubpageText ( title,
expected,
msg = '' 
)
Todo:
Handle $wgNamespacesWithSubpages cases provideSubpageTitleCases Title::getSubpageText

Definition at line 470 of file TitleTest.php.

References $title, and Title\newFromText().

TitleTest::testIsValidMoveOperation ( source,
target,
expected 
)

Auth-less test of Title::isValidMoveOperation.

Database

Parameters:
string$source
string$target
array | string | bool$expectedRequired error provideTestIsValidMoveOperation Title::isValidMoveOperation

Definition at line 218 of file TitleTest.php.

References $error, $source, $title, array(), as, flattenErrorsArray(), and Title\newFromText().

Title::legalChars

Definition at line 24 of file TitleTest.php.

References as, and Title\legalChars().

See also mediawiki.Title.test.js Title::secureAndSplit.

Todo:
This method should be split into 2 separate tests each with a provider

Definition at line 42 of file TitleTest.php.

References array(), as, and Title\newFromText().

TitleTest::testWgWhitelistReadRegexp ( whitelistRegexp,
source,
action,
expected 
)

Auth-less test of Title::userCan.

Parameters:
array$whitelistRegexp
string$source
string$action
array | string | bool$expectedRequired error

Title::checkReadPermissions dataWgWhitelistReadRegexp

Definition at line 253 of file TitleTest.php.

References $error, $source, $title, $wgUser, array(), as, flattenErrorsArray(), global, and Title\newFromDBkey().


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