From: Seb35 Date: Sun, 11 Dec 2016 20:16:11 +0000 (+0100) Subject: The automatic test in MediaWikiTestCase was marked as risky X-Git-Tag: 1.31.0-rc.0~4601^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=6728bbb8194f73365df2205706ce8ac3b3eee169;p=lhc%2Fweb%2Fwiklou.git The automatic test in MediaWikiTestCase was marked as risky MediaWikiTestCase::testMediaWikiTestCaseParentSetupCalled is marked as risky when strict code coverage is activated in PHPUnit (--coverage-html ../../docs/code-coverage --strict-coverage --debug -v). This patch adds the annotation @coversNothing to disable code coverage on this test. As an automatically-added test, it must adapt to a number of different environments, so it is not feasible to add the exhaustive list of @uses classes. Bug: T152923 Change-Id: Ic670ff2d89f1c5df500c0d10b153d4efd013d7f4 --- diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index db1df5c04f..9745f5b427 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -582,6 +582,10 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { /** * Make sure MediaWikiTestCase extending classes have called their * parent setUp method + * + * With strict coverage activated in PHP_CodeCoverage, this test would be + * marked as risky without the following annotation (T152923). + * @coversNothing */ final public function testMediaWikiTestCaseParentSetupCalled() { $this->assertArrayHasKey( 'setUp', $this->called,