From 9de512d59c323f3958b5d307920cedb7d8b64c89 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Sat, 12 Aug 2023 21:07:15 +0200 Subject: [PATCH] tests: Resolve phpunit filename deprecation errors PHPUnit wants the filenames of the tests to match the class name being tested. Bug: T337333 Change-Id: I44f626d1bfdf151fecafc29c51b2cf2bb90481b0 --- .phpcs.xml | 6 +++++- tests/phpunit/TalkPageFunctionalTest.php | 2 +- tests/phpunit/ThankYouEditTest.php | 2 +- tests/phpunit/unit/AttributeManagerTest.php | 2 +- tests/phpunit/unit/DiffParserTest.php | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.phpcs.xml b/.phpcs.xml index d8ec56255..b77393d3c 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -3,11 +3,15 @@ . - + + includes/ + maintenance/ + scripts/ + diff --git a/tests/phpunit/TalkPageFunctionalTest.php b/tests/phpunit/TalkPageFunctionalTest.php index 7f19e7f7b..46475e548 100644 --- a/tests/phpunit/TalkPageFunctionalTest.php +++ b/tests/phpunit/TalkPageFunctionalTest.php @@ -7,7 +7,7 @@ use MediaWiki\Extension\Notifications\Model\Event; * @group Database * @group medium */ -class EchoTalkPageFunctionalTest extends ApiTestCase { +class TalkPageFunctionalTest extends ApiTestCase { protected function setUp(): void { parent::setUp(); diff --git a/tests/phpunit/ThankYouEditTest.php b/tests/phpunit/ThankYouEditTest.php index 23fa8e1bc..8164ba14e 100644 --- a/tests/phpunit/ThankYouEditTest.php +++ b/tests/phpunit/ThankYouEditTest.php @@ -6,7 +6,7 @@ use MediaWiki\Extension\Notifications\Mapper\NotificationMapper; * @group Echo * @group Database */ -class MWEchoThankYouEditTest extends MediaWikiIntegrationTestCase { +class ThankYouEditTest extends MediaWikiIntegrationTestCase { protected function setUp(): void { parent::setUp(); diff --git a/tests/phpunit/unit/AttributeManagerTest.php b/tests/phpunit/unit/AttributeManagerTest.php index 149f420d1..313e09e56 100644 --- a/tests/phpunit/unit/AttributeManagerTest.php +++ b/tests/phpunit/unit/AttributeManagerTest.php @@ -8,7 +8,7 @@ use MediaWiki\User\UserOptionsLookup; /** * @covers \EchoAttributeManager */ -class EchoAttributeManagerTest extends MediaWikiUnitTestCase { +class AttributeManagerTest extends MediaWikiUnitTestCase { private function getAttributeManager( array $notifications, diff --git a/tests/phpunit/unit/DiffParserTest.php b/tests/phpunit/unit/DiffParserTest.php index f0958598f..dd8647abc 100644 --- a/tests/phpunit/unit/DiffParserTest.php +++ b/tests/phpunit/unit/DiffParserTest.php @@ -4,7 +4,7 @@ * @covers \EchoDiffParser * @group Echo */ -class EchoDiffParserTest extends MediaWikiUnitTestCase { +class DiffParserTest extends MediaWikiUnitTestCase { /** * @dataProvider provider_getChangeSet