Remove group validator from UnitTestCase
authorKosta Harlan <kharlan@wikimedia.org>
Mon, 1 Jul 2019 15:42:21 +0000 (11:42 -0400)
committerKosta Harlan <kharlan@wikimedia.org>
Mon, 1 Jul 2019 15:42:21 +0000 (11:42 -0400)
Whether a unit test has `@group Database` is irrelevant, since it will simply
not work if it relies on database access.

Change-Id: Ibe01d4912160ae44ca86ef6f7c3946501a8c067e

tests/phpunit/MediaWikiUnitTestCase.php

index c1dc0f9..1065c2f 100644 (file)
@@ -30,17 +30,5 @@ use PHPUnit\Framework\TestCase;
 abstract class MediaWikiUnitTestCase extends TestCase {
        use PHPUnit4And6Compat;
        use MediaWikiCoversValidator;
-       use MediaWikiGroupValidator;
-
-       /**
-        * @throws ReflectionException
-        */
-       protected function setUp() {
-               parent::setUp();
-               if ( $this->isTestInDatabaseGroup() ) {
-                       throw new \Exception( get_class( $this ) .
-                         ' extends MediaWikiUnitTestCase, and may not have the @group Database annotation.' );
-               }
-       }
 
 }