Move trivially compatible tests to the unit tests suite
[lhc/web/wiklou.git] / tests / phpunit / MediaWikiUnitTestCase.php
index 06f0c9c..c1dc0f9 100644 (file)
@@ -30,4 +30,17 @@ 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.' );
+               }
+       }
+
 }