Merge "add Interwiki::selectFields"
[lhc/web/wiklou.git] / tests / phpunit / includes / MWNamespaceTest.php
index 6b231fc..da36ffd 100644 (file)
@@ -53,10 +53,6 @@ class MWNamespaceTest extends MediaWikiTestCase {
                $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 ) );
        }
 
        /**
@@ -550,6 +546,15 @@ class MWNamespaceTest extends MediaWikiTestCase {
 
        }
 
+       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