Improve @covers for TemplateParserTest
authorKunal Mehta <legoktm@member.fsf.org>
Thu, 28 Dec 2017 08:31:08 +0000 (00:31 -0800)
committerLegoktm <legoktm@member.fsf.org>
Thu, 28 Dec 2017 08:53:31 +0000 (08:53 +0000)
The current @covers tags for TemplateParserTest are an incomplete call
stack for TemplateParser::processTemplate, and miss out on some
functions that are called. Those functions could be repeated in @covers
tags, but it would be burdensome to keep it up to date.

Instead, just use class level @covers for the whole test case. This also
takes care of the previously uncovered testEnableRecursivePartials().

Change-Id: I475ceba26b70a115b40d7735834a07f298f7bf99

tests/phpunit/includes/TemplateParserTest.php

index c161f85..4a803e6 100644 (file)
@@ -2,6 +2,7 @@
 
 /**
  * @group Templates
+ * @covers TemplateParser
  */
 class TemplateParserTest extends MediaWikiTestCase {
 
@@ -19,9 +20,6 @@ class TemplateParserTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideProcessTemplate
-        * @covers TemplateParser::processTemplate
-        * @covers TemplateParser::getTemplate
-        * @covers TemplateParser::getTemplateFilename
         */
        public function testProcessTemplate( $name, $args, $result, $exception = false ) {
                if ( $exception ) {