parserTests: flag articles creation as internal
authorAntoine Musso <hashar@free.fr>
Thu, 24 Nov 2016 15:09:26 +0000 (16:09 +0100)
committerAntoine Musso <hashar@free.fr>
Thu, 24 Nov 2016 15:11:04 +0000 (16:11 +0100)
When the parser test suite creates articles, there is no need to check
whether it has been pre parsed in stash edit. That is quite spammy in
the debug log and always a cache miss.

Bypass the cache lookup by passing EDIT_INTERNAL to doEditContent()

Change-Id: I27e212ab1a76ebcf25b383514c9ad8ad0b28383c

tests/parser/ParserTestRunner.php

index 04c142a..281e1df 100644 (file)
@@ -1508,7 +1508,11 @@ class ParserTestRunner {
                // get a reference to the mock object.
                MessageCache::singleton()->getParser();
                $restore = $this->executeSetupSnippets( [ 'wgParser' => new ParserTestMockParser ] );
-               $status = $page->doEditContent( ContentHandler::makeContent( $text, $title ), '', EDIT_NEW );
+               $status = $page->doEditContent(
+                       ContentHandler::makeContent( $text, $title ),
+                       '',
+                       EDIT_NEW | EDIT_INTERNAL
+               );
                $restore();
 
                if ( !$status->isOK() ) {