Merge "tests: Clear recentchanges automatically"
This commit is contained in:
commit
83f1972c29
1 changed files with 8 additions and 0 deletions
|
|
@ -2118,6 +2118,14 @@ abstract class MediaWikiIntegrationTestCase extends PHPUnit\Framework\TestCase {
|
|||
}
|
||||
$extraTables = array_values( $extraTables );
|
||||
$tablesUsed = array_unique( array_merge( $tablesUsed, ...$extraTables ) );
|
||||
// special case: if revision/logging is used, clear recentchanges
|
||||
// (but not necessarily logging/revision, unless that is also used)
|
||||
if (
|
||||
array_intersect( $tablesUsed, [ 'revision', 'logging' ] ) &&
|
||||
!in_array( 'recentchanges', $tablesUsed, true )
|
||||
) {
|
||||
$tablesUsed[] = 'recentchanges';
|
||||
}
|
||||
|
||||
if ( in_array( 'user', $tablesUsed ) ) {
|
||||
TestUserRegistry::clear();
|
||||
|
|
|
|||
Loading…
Reference in a new issue