MediaWiki
REL1_20
|
Test class for MWNamespace. More...
Public Member Functions | |
__call ($method, $args) | |
assertDifferentSubject ($ns1, $ns2, $msg= '') | |
assertSameSubject ($ns1, $ns2, $msg= '') | |
testCanTalk () | |
testEquals () | |
Test MWNamespace::equals Note if we add a namespace registration system with keys like 'MAIN' we should add tests here for equivilance on things like 'MAIN' == 0 and 'MAIN' == NS_MAIN. | |
testGetAssociated () | |
Regular getAssociated() calls Namespaces without an associated page (NS_MEDIA, NS_SPECIAL) are tested in the function testGetAssociatedExceptions() | |
testGetAssociatedExceptionsForNsMedia () | |
MWException | |
testGetAssociatedExceptionsForNsSpecial () | |
MWException | |
testGetContentNamespaces () | |
testGetSubject () | |
testGetSubjectNamespaces () | |
testGetTalk () | |
Regular getTalk() calls Namespaces without a talk page (NS_MEDIA, NS_SPECIAL) are tested in the function testGetTalkExceptions() | |
testGetTalkExceptionsForNsMedia () | |
Exceptions with getTalk() NS_MEDIA does not have talk pages. | |
testGetTalkExceptionsForNsSpecial () | |
Exceptions with getTalk() NS_SPECIAL does not have talk pages. | |
testGetTalkNamespaces () | |
testHasGenderDistinction () | |
testHasSubpages () | |
testIsCapitalizedHardcodedAssertions () | |
Some namespaces are always capitalized per code definition in MWNamespace::$alwaysCapitalizedNamespaces. | |
testIsCapitalizedWithWgCapitalLinkOverrides () | |
Counter part for MWNamespace::testIsCapitalizedWithWgCapitalLinks() now testing the $wgCapitalLinkOverrides global. | |
testIsCapitalizedWithWgCapitalLinks () | |
Follows up for testIsCapitalizedHardcodedAssertions() but alter the global $wgCapitalLink setting to have extended coverage. | |
testIsContent () | |
testIsContentWithAdditionsInWgContentNamespaces () | |
Similar to testIsContent() but alters the $wgContentNamespaces global variable. | |
testIsMovable () | |
testIsNonincludable () | |
testIsSubject () | |
Please make sure to change testIsTalk() if you change the assertions below. | |
testIsTalk () | |
Reverse of testIsSubject(). | |
testIsWatchable () | |
testSpecialAndMediaAreDifferentSubjects () | |
testSubjectEquals () | |
Test MWNamespace::subjectEquals. | |
Protected Member Functions | |
setUp () | |
Sets up the fixture, for example, opens a network connection. | |
tearDown () | |
Tears down the fixture, for example, closes a network connection. |
Test class for MWNamespace.
Generated by PHPUnit on 2011-02-20 at 21:01:55.
Definition at line 13 of file MWNamespaceTest.php.
MWNamespaceTest::__call | ( | $ | method, |
$ | args | ||
) |
Reimplemented from MediaWikiTestCase.
Definition at line 589 of file MWNamespaceTest.php.
References MWNamespace\getCanonicalName().
MWNamespaceTest::assertDifferentSubject | ( | $ | ns1, |
$ | ns2, | ||
$ | msg = '' |
||
) |
Definition at line 624 of file MWNamespaceTest.php.
References MWNamespace\subjectEquals().
Referenced by testSpecialAndMediaAreDifferentSubjects(), and testSubjectEquals().
MWNamespaceTest::assertSameSubject | ( | $ | ns1, |
$ | ns2, | ||
$ | msg = '' |
||
) |
Definition at line 621 of file MWNamespaceTest.php.
References MWNamespace\subjectEquals().
Referenced by testSubjectEquals().
MWNamespaceTest::setUp | ( | ) | [protected] |
Sets up the fixture, for example, opens a network connection.
This method is called before a test is executed.
Definition at line 18 of file MWNamespaceTest.php.
MWNamespaceTest::tearDown | ( | ) | [protected] |
Tears down the fixture, for example, closes a network connection.
This method is called after a test is executed.
Reimplemented from MediaWikiTestCase.
Definition at line 25 of file MWNamespaceTest.php.
Test MWNamespace::equals Note if we add a namespace registration system with keys like 'MAIN' we should add tests here for equivilance on things like 'MAIN' == 0 and 'MAIN' == NS_MAIN.
Definition at line 165 of file MWNamespaceTest.php.
References MWNamespace\equals().
Regular getAssociated() calls Namespaces without an associated page (NS_MEDIA, NS_SPECIAL) are tested in the function testGetAssociatedExceptions()
Definition at line 124 of file MWNamespaceTest.php.
References MWNamespace\getAssociated().
Definition at line 136 of file MWNamespaceTest.php.
References MWNamespace\getAssociated().
Definition at line 143 of file MWNamespaceTest.php.
References MWNamespace\getAssociated().
Definition at line 392 of file MWNamespaceTest.php.
Definition at line 80 of file MWNamespaceTest.php.
References MWNamespace\getSubject().
Definition at line 442 of file MWNamespaceTest.php.
References MWNamespace\getSubjectNamespaces().
Regular getTalk() calls Namespaces without a talk page (NS_MEDIA, NS_SPECIAL) are tested in the function testGetTalkExceptions()
Definition at line 94 of file MWNamespaceTest.php.
References MWNamespace\getTalk().
Exceptions with getTalk() NS_MEDIA does not have talk pages.
MediaWiki raise an exception for them. MWException
Definition at line 106 of file MWNamespaceTest.php.
References MWNamespace\getTalk().
Exceptions with getTalk() NS_SPECIAL does not have talk pages.
MediaWiki raise an exception for them. MWException
Definition at line 115 of file MWNamespaceTest.php.
References MWNamespace\getTalk().
Definition at line 457 of file MWNamespaceTest.php.
References MWNamespace\getTalkNamespaces().
Definition at line 566 of file MWNamespaceTest.php.
References MWNamespace\hasGenderDistinction().
Definition at line 358 of file MWNamespaceTest.php.
Some namespaces are always capitalized per code definition in MWNamespace::$alwaysCapitalizedNamespaces.
Definition at line 474 of file MWNamespaceTest.php.
References MWNamespace\isCapitalized().
Counter part for MWNamespace::testIsCapitalizedWithWgCapitalLinks() now testing the $wgCapitalLinkOverrides global.
Definition at line 533 of file MWNamespaceTest.php.
Follows up for testIsCapitalizedHardcodedAssertions() but alter the global $wgCapitalLink setting to have extended coverage.
MWNamespace::isCapitalized() rely on two global settings: $wgCapitalLinkOverrides = array(); by default $wgCapitalLinks = true; by default This function test $wgCapitalLinks
Global setting correctness is tested against the NS_PROJECT and NS_PROJECT_TALK namespaces since they are not hardcoded nor specials
Definition at line 505 of file MWNamespaceTest.php.
Definition at line 268 of file MWNamespaceTest.php.
Similar to testIsContent() but alters the $wgContentNamespaces global variable.
Definition at line 318 of file MWNamespaceTest.php.
Definition at line 34 of file MWNamespaceTest.php.
References MWNamespace\isMovable().
Definition at line 579 of file MWNamespaceTest.php.
References MWNamespace\isNonincludable().
Please make sure to change testIsTalk() if you change the assertions below.
Definition at line 42 of file MWNamespaceTest.php.
Reverse of testIsSubject().
Please update testIsSubject() if you change assertions below
Definition at line 62 of file MWNamespaceTest.php.
Definition at line 344 of file MWNamespaceTest.php.
Definition at line 194 of file MWNamespaceTest.php.
References assertDifferentSubject().
Test MWNamespace::subjectEquals.
Definition at line 180 of file MWNamespaceTest.php.
References assertDifferentSubject(), and assertSameSubject().