From b251f3750fb68a1c7c655eeccc09efecf504eda4 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 11 Aug 2022 11:33:58 -0400 Subject: [PATCH] ApiTestCase: Drop testApiTestGroup forcing use of medium/large We do not encourage people to use these groups, they are not widely used, and this is just forcing cruft into code for no value. Change-Id: Ia58aa62ea6a1694694fb54acbd717181cd36e051 --- tests/phpunit/includes/api/ApiTestCase.php | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/tests/phpunit/includes/api/ApiTestCase.php b/tests/phpunit/includes/api/ApiTestCase.php index 45955e5b8db..d8694bdaba0 100644 --- a/tests/phpunit/includes/api/ApiTestCase.php +++ b/tests/phpunit/includes/api/ApiTestCase.php @@ -3,8 +3,6 @@ use MediaWiki\MediaWikiServices; use MediaWiki\Permissions\Authority; use MediaWiki\Session\SessionManager; -use PHPUnit\Framework\Assert; -use PHPUnit\Util\Test; abstract class ApiTestCase extends MediaWikiLangTestCase { protected static $apiUrl; @@ -183,20 +181,6 @@ abstract class ApiTestCase extends MediaWikiLangTestCase { ); } - /** - * @coversNothing - */ - public function testApiTestGroup() { - $groups = Test::getGroups( static::class ); - $constraint = Assert::logicalOr( - $this->contains( 'medium' ), - $this->contains( 'large' ) - ); - $this->assertThat( $groups, $constraint, - 'ApiTestCase::setUp can be slow, tests must be "medium" or "large"' - ); - } - /** * Expect an ApiUsageException to be thrown with the given parameters, which are the same as * ApiUsageException::newWithMessage()'s parameters. This allows checking for an exception