In MediaWiki\Sniffs\PHPUnit\PHPUnitTestTrait, you currently have
private static $PHPUNIT_CLASSES = [ // @phan-suppress-previous-line PhanReadOnlyPrivateProperty Traits cannot have constants 'MediaWikiTestCase' => 'MediaWikiTestCase', 'MediaWikiUnitTestCase' => 'MediaWikiUnitTestCase', 'MediaWikiIntegrationTestCase' => 'MediaWikiIntegrationTestCase', 'PHPUnit_Framework_TestCase' => 'PHPUnit_Framework_TestCase', // This class may be 'use'd, but checking for that would be complicated 'PHPUnit\\Framework\\TestCase' => 'PHPUnit\\Framework\\TestCase', ];
The MediaWiki entries, of course, only make sense within MediaWiki and not for any reusers like us. But that's ok.
The entry for PHPUnit\Framework\TestCase is admittedly not comprehensive.
You also have
return array_key_exists( $extendedClass, self::$PHPUNIT_CLASSES ) || (bool)preg_match( '/(?:Test(?:Case)?(?:Base)?|Suite)$/', $phpcsFile->getDeclarationName( $classToken ) );
which checks for extending a class in the list, or the class itself happening to end in "Test", "TestCase", "TestBase", "TestCaseBase", or "Suite".
It would be nice if we could use phpcs's <config> or <properties> to extend this list. But even looking for extending any class name ending in "TestCase", "TestBase", "TestCaseBase", or "Suite" would be an improvement.