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
This commit is contained in:
Umherirrender 2023-08-12 21:07:15 +02:00
parent 154acac786
commit 9de512d59c
5 changed files with 9 additions and 5 deletions

View file

@ -3,11 +3,15 @@
<file>.</file>
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate" />
<exclude name="MediaWiki.Files.ClassMatchesFilename.NotMatch" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
<exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
</rule>
<rule ref="MediaWiki.Files.ClassMatchesFilename.NotMatch">
<exclude-pattern>includes/</exclude-pattern>
<exclude-pattern>maintenance/</exclude-pattern>
<exclude-pattern>scripts/</exclude-pattern>
</rule>
<arg name="encoding" value="UTF-8" />
<arg name="extensions" value="php" />
<arg name="colors" />

View file

@ -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();

View file

@ -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();

View file

@ -8,7 +8,7 @@ use MediaWiki\User\UserOptionsLookup;
/**
* @covers \EchoAttributeManager
*/
class EchoAttributeManagerTest extends MediaWikiUnitTestCase {
class AttributeManagerTest extends MediaWikiUnitTestCase {
private function getAttributeManager(
array $notifications,

View file

@ -4,7 +4,7 @@
* @covers \EchoDiffParser
* @group Echo
*/
class EchoDiffParserTest extends MediaWikiUnitTestCase {
class DiffParserTest extends MediaWikiUnitTestCase {
/**
* @dataProvider provider_getChangeSet