$this->assertIsNotSubject( NS_TALK );
$this->assertIsNotSubject( NS_USER_TALK );
$this->assertIsNotSubject( 101 ); # user defined
-
- // Back compat
- $this->assertTrue( MWNamespace::isMain( NS_MAIN ) == MWNamespace::isSubject( NS_MAIN ) );
- $this->assertTrue( MWNamespace::isMain( NS_USER_TALK ) == MWNamespace::isSubject( NS_USER_TALK ) );
}
/**
public function testSpecialAndMediaAreDifferentSubjects() {
$this->assertDifferentSubject(
NS_MEDIA, NS_SPECIAL,
- "NS_MEDIA and NS_SPECIAL are different subhects"
+ "NS_MEDIA and NS_SPECIAL are different subject namespaces"
);
$this->assertDifferentSubject(
NS_SPECIAL, NS_MEDIA,
- "NS_SPECIAL and NS_MEDIA are different subhects"
+ "NS_SPECIAL and NS_MEDIA are different subject namespaces"
);
}
$this->assertEquals(
array( NS_MAIN, NS_USER, NS_CATEGORY ),
MWNamespace::getcontentNamespaces(),
- 'NS_MAIN is forced in wgContentNamespaces even if unwanted'
+ 'NS_MAIN is forced in $wgContentNamespaces even if unwanted'
);
# test other cases, return $wgcontentNamespaces as is
}
+ public function testIsNonincludable() {
+ global $wgNonincludableNamespaces;
+ $wgNonincludableNamespaces = array( NS_USER );
+
+ $this->assertTrue( MWNamespace::isNonincludable( NS_USER ) );
+
+ $this->assertFalse( MWNamespace::isNonincludable( NS_TEMPLATE ) );
+ }
+
####### HELPERS ###########################################################
function __call( $method, $args ) {
// Call the real method if it exists