From d28f315d247f2c7a182773727380535e47cd507d Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Fri, 1 Feb 2019 20:46:59 +0100 Subject: [PATCH] Add @coversNothing for left over tests and enable sniff LessFileCompilationTest is checking less files for valid syntax doc test is checking xml file for valid syntax MediaWikiTest is testing a complex situation with many functions involved SideBarTest is self checking, needs no coverage structure tests not covers functions, there are covers global structures Change-Id: I3ac65db561cae0be8418aa9c830e7a9f46ad11fe --- .phpcs.xml | 1 - tests/phpunit/LessFileCompilationTest.php | 1 + tests/phpunit/docs/ExportDemoTest.php | 1 + tests/phpunit/includes/MediaWikiTest.php | 1 + tests/phpunit/skins/SideBarTest.php | 1 + tests/phpunit/structure/ApiStructureTest.php | 1 + tests/phpunit/structure/DatabaseIntegrationTest.php | 1 + tests/phpunit/structure/SpecialPageFatalTest.php | 1 + 8 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.phpcs.xml b/.phpcs.xml index c0154c7543..0940e7fa96 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -11,7 +11,6 @@ - diff --git a/tests/phpunit/LessFileCompilationTest.php b/tests/phpunit/LessFileCompilationTest.php index 5e1f1a9666..1f1c395a1a 100644 --- a/tests/phpunit/LessFileCompilationTest.php +++ b/tests/phpunit/LessFileCompilationTest.php @@ -5,6 +5,7 @@ * * @see https://github.com/sebastianbergmann/phpunit/blob/master/src/Extensions/PhptTestCase.php * @author Sam Smith + * @coversNothing */ class LessFileCompilationTest extends ResourceLoaderTestCase { diff --git a/tests/phpunit/docs/ExportDemoTest.php b/tests/phpunit/docs/ExportDemoTest.php index 8288cae0f2..ec806aeff4 100644 --- a/tests/phpunit/docs/ExportDemoTest.php +++ b/tests/phpunit/docs/ExportDemoTest.php @@ -6,6 +6,7 @@ * * @group Dump * @group large + * @coversNothing */ class ExportDemoTest extends DumpTestCase { diff --git a/tests/phpunit/includes/MediaWikiTest.php b/tests/phpunit/includes/MediaWikiTest.php index 916a6ebafc..77bbc07b34 100644 --- a/tests/phpunit/includes/MediaWikiTest.php +++ b/tests/phpunit/includes/MediaWikiTest.php @@ -187,6 +187,7 @@ class MediaWikiTest extends MediaWikiTestCase { /** * Test a post-send job can not set cookies (T191537). + * @coversNothing */ public function testPostSendJobDoesNotSetCookie() { // Prevent updates from running diff --git a/tests/phpunit/skins/SideBarTest.php b/tests/phpunit/skins/SideBarTest.php index ec85bb0326..22ca60f7bc 100644 --- a/tests/phpunit/skins/SideBarTest.php +++ b/tests/phpunit/skins/SideBarTest.php @@ -170,6 +170,7 @@ class SideBarTest extends MediaWikiLangTestCase { /** * Simple test to verify our helper assertAttribs() is functional + * @coversNothing */ public function testTestAttributesAssertionHelper() { $this->setMwGlobals( [ diff --git a/tests/phpunit/structure/ApiStructureTest.php b/tests/phpunit/structure/ApiStructureTest.php index 95d3b60b00..4c64291b85 100644 --- a/tests/phpunit/structure/ApiStructureTest.php +++ b/tests/phpunit/structure/ApiStructureTest.php @@ -10,6 +10,7 @@ use Wikimedia\TestingAccessWrapper; * - do not have inconsistencies in the parameter definitions * * @group API + * @coversNothing */ class ApiStructureTest extends MediaWikiTestCase { diff --git a/tests/phpunit/structure/DatabaseIntegrationTest.php b/tests/phpunit/structure/DatabaseIntegrationTest.php index b0c1c8f1f5..9c0a73de8d 100644 --- a/tests/phpunit/structure/DatabaseIntegrationTest.php +++ b/tests/phpunit/structure/DatabaseIntegrationTest.php @@ -5,6 +5,7 @@ use Wikimedia\Rdbms\Database; /** * @group Database + * @coversNothing */ class DatabaseIntegrationTest extends MediaWikiTestCase { /** diff --git a/tests/phpunit/structure/SpecialPageFatalTest.php b/tests/phpunit/structure/SpecialPageFatalTest.php index a6bc5a7f0e..c08fe2fc7f 100644 --- a/tests/phpunit/structure/SpecialPageFatalTest.php +++ b/tests/phpunit/structure/SpecialPageFatalTest.php @@ -11,6 +11,7 @@ use MediaWiki\MediaWikiServices; * * @since 1.32 * @author Addshore + * @coversNothing */ class SpecialPageFatalTest extends MediaWikiTestCase { public function provideSpecialPages() { -- 2.20.1