From: Antoine Musso Date: Fri, 15 Jul 2011 09:45:57 +0000 (+0000) Subject: NS_MAIN can locally have subpages enabled X-Git-Tag: 1.31.0-rc.0~28829 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=76496b0e0270939ce8ddae5b3cdf375e62c7a65d;p=lhc%2Fweb%2Fwiklou.git NS_MAIN can locally have subpages enabled This workaround test if any local change has been made, if so the test will be skipped. fu r82577 --- diff --git a/tests/phpunit/includes/MWNamespaceTest.php b/tests/phpunit/includes/MWNamespaceTest.php index 8ec8ab7ccf..7da1864761 100644 --- a/tests/phpunit/includes/MWNamespaceTest.php +++ b/tests/phpunit/includes/MWNamespaceTest.php @@ -271,7 +271,14 @@ class MWNamespaceTest extends MediaWikiTestCase { $this->assertFalse( MWNamespace::hasSubpages( NS_SPECIAL ) ); // namespaces without subpages - $this->assertFalse( MWNamespace::hasSubpages( NS_MAIN ) ); + global $wgNamespacesWithSubpages; + if( array_key_exists( NS_MAIN, $wgNamespacesWithSubpages ) + && $wgNamespacesWithSubpages[NS_MAIN] === true + ) { + $this->markTestSkipped( "Main namespace has subpages enabled" ); + } else { + $this->assertFalse( MWNamespace::hasSubpages( NS_MAIN ) ); + } // Some namespaces with subpages $this->assertTrue( MWNamespace::hasSubpages( NS_TALK ) );