From 4acb7ed51c905248627fc2b840d2fd1b570fc9bd Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Tue, 12 Jun 2018 13:27:09 -0700 Subject: [PATCH] Add @coversNothing to tests that don't cover specific PHP classes Change-Id: Idbd364561bc28547e9fac20d7a80b9a44edf14a9 --- tests/phpunit/languages/SpecialPageAliasTest.php | 2 ++ tests/phpunit/structure/AvailableRightsTest.php | 3 +++ tests/phpunit/structure/ContentHandlerSanityTest.php | 1 + tests/phpunit/structure/ExtensionJsonValidationTest.php | 2 ++ tests/phpunit/structure/ResourcesTest.php | 1 + tests/phpunit/structure/StructureTest.php | 1 + tests/phpunit/suites/ExtensionsTestSuite.php | 3 +++ 7 files changed, 13 insertions(+) diff --git a/tests/phpunit/languages/SpecialPageAliasTest.php b/tests/phpunit/languages/SpecialPageAliasTest.php index 0bb6a4d293..d406c88933 100644 --- a/tests/phpunit/languages/SpecialPageAliasTest.php +++ b/tests/phpunit/languages/SpecialPageAliasTest.php @@ -7,12 +7,14 @@ * @group SpecialPageAliases * @group SystemTest * @group medium + * @todo This should be a structure test * * @author Katie Filbert < aude.wiki@gmail.com > */ class SpecialPageAliasTest extends MediaWikiTestCase { /** + * @coversNothing * @dataProvider validSpecialPageAliasesProvider */ public function testValidSpecialPageAliases( $code, $specialPageAliases ) { diff --git a/tests/phpunit/structure/AvailableRightsTest.php b/tests/phpunit/structure/AvailableRightsTest.php index 6c2ff024e1..ea132e9a7b 100644 --- a/tests/phpunit/structure/AvailableRightsTest.php +++ b/tests/phpunit/structure/AvailableRightsTest.php @@ -35,6 +35,9 @@ class AvailableRightsTest extends PHPUnit\Framework\TestCase { return $rights; } + /** + * @coversNothing + */ public function testAvailableRights() { $missingRights = array_diff( $this->getAllVisibleRights(), diff --git a/tests/phpunit/structure/ContentHandlerSanityTest.php b/tests/phpunit/structure/ContentHandlerSanityTest.php index c8bcd60de3..c75a9d02a3 100644 --- a/tests/phpunit/structure/ContentHandlerSanityTest.php +++ b/tests/phpunit/structure/ContentHandlerSanityTest.php @@ -32,6 +32,7 @@ class ContentHandlerSanityTest extends MediaWikiTestCase { } /** + * @coversNothing * @dataProvider provideHandlers * @param ContentHandler $handler */ diff --git a/tests/phpunit/structure/ExtensionJsonValidationTest.php b/tests/phpunit/structure/ExtensionJsonValidationTest.php index 60c97ccfac..dea8f5a541 100644 --- a/tests/phpunit/structure/ExtensionJsonValidationTest.php +++ b/tests/phpunit/structure/ExtensionJsonValidationTest.php @@ -19,6 +19,8 @@ /** * Validates all loaded extensions and skins using the ExtensionRegistry * against the extension.json schema in the docs/ folder. + * + * @coversNothing */ class ExtensionJsonValidationTest extends PHPUnit\Framework\TestCase { diff --git a/tests/phpunit/structure/ResourcesTest.php b/tests/phpunit/structure/ResourcesTest.php index 62ddacebfe..2090e29b77 100644 --- a/tests/phpunit/structure/ResourcesTest.php +++ b/tests/phpunit/structure/ResourcesTest.php @@ -11,6 +11,7 @@ * @copyright © 2012, Niklas Laxström * @copyright © 2012, Santhosh Thottingal * @copyright © 2012, Timo Tijhof + * @coversNothing */ class ResourcesTest extends MediaWikiTestCase { diff --git a/tests/phpunit/structure/StructureTest.php b/tests/phpunit/structure/StructureTest.php index 4df791ecd8..82302b1758 100644 --- a/tests/phpunit/structure/StructureTest.php +++ b/tests/phpunit/structure/StructureTest.php @@ -9,6 +9,7 @@ class StructureTest extends MediaWikiTestCase { * Verify all files that appear to be tests have file names ending in * Test. If the file names do not end in Test, they will not be run. * @group medium + * @coversNothing */ public function testUnitTestFileNamesEndWithTest() { if ( wfIsWindows() ) { diff --git a/tests/phpunit/suites/ExtensionsTestSuite.php b/tests/phpunit/suites/ExtensionsTestSuite.php index 02934fa7bd..7d1d3311d6 100644 --- a/tests/phpunit/suites/ExtensionsTestSuite.php +++ b/tests/phpunit/suites/ExtensionsTestSuite.php @@ -45,6 +45,9 @@ class ExtensionsTestSuite extends PHPUnit_Framework_TestSuite { * when no extensions with tests are used. */ class DummyExtensionsTest extends MediaWikiTestCase { + /** + * @coversNothing + */ public function testNothing() { $this->assertTrue( true ); } -- 2.20.1