From: Kunal Mehta Date: Thu, 28 Dec 2017 08:31:08 +0000 (-0800) Subject: Improve @covers for TemplateParserTest X-Git-Tag: 1.31.0-rc.0~1068^2 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=075ab54a4494f8652447744de7366f6d9355de26 Improve @covers for TemplateParserTest 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 --- diff --git a/tests/phpunit/includes/TemplateParserTest.php b/tests/phpunit/includes/TemplateParserTest.php index c161f85306..4a803e6374 100644 --- a/tests/phpunit/includes/TemplateParserTest.php +++ b/tests/phpunit/includes/TemplateParserTest.php @@ -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 ) {