X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=tests%2Fphpunit%2FMediaWikiTestCase.php;h=4d3c37bda5801115485b0fab815c5d98c565b743;hb=d849eb16ffa620f85525ce09192f0c9bc3ef503c;hp=f04eec73b4d6e1801711107e648a19ca1920d2bc;hpb=059fdf444ebc254fe703d36c98397164b5dbd533;p=lhc%2Fweb%2Fwiklou.git diff --git a/tests/phpunit/MediaWikiTestCase.php b/tests/phpunit/MediaWikiTestCase.php index f04eec73b4..4d3c37bda5 100644 --- a/tests/phpunit/MediaWikiTestCase.php +++ b/tests/phpunit/MediaWikiTestCase.php @@ -968,12 +968,13 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase { * @since 1.18 */ public function needsDB() { - # if the test says it uses database tables, it needs the database + // If the test says it uses database tables, it needs the database if ( $this->tablesUsed ) { return true; } - # if the test says it belongs to the Database group, it needs the database + // If the test class says it belongs to the Database group, it needs the database. + // NOTE: This ONLY checks for the group in the class level doc comment. $rc = new ReflectionClass( $this ); if ( preg_match( '/@group +Database/im', $rc->getDocComment() ) ) { return true;