Skip parser tests if main NS isn't wikitext.
authordaniel <daniel.kinzler@wikimedia.de>
Fri, 12 Oct 2012 13:39:01 +0000 (15:39 +0200)
committerdaniel <daniel.kinzler@wikimedia.de>
Fri, 12 Oct 2012 13:39:01 +0000 (15:39 +0200)
Change-Id: Ie3267e4db4246d522b6564204e9688258fc41324

tests/phpunit/includes/parser/NewParserTest.php

index 8ddfa65..804726b 100644 (file)
@@ -524,6 +524,14 @@ class NewParserTest extends MediaWikiTestCase {
                        return;
                }
 
+               if ( !$this->isWikitextNS( NS_MAIN ) ) {
+                       // parser tests frequently assume that the main namespace contains wikitext.
+                       // @todo: When setting up pages, force the content model. Only skip if
+                       //        $wgtContentModelUseDB is false.
+                       $this->markTestSkipped( "Main namespace does not support wikitext,"
+                                       . "skipping parser test: $desc" );
+               }
+
                wfDebug( "Running parser test: $desc\n" );
 
                $opts = $this->parseOptions( $opts );