mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 15:30:42 +00:00
702d77e3ce
For fixing bugs like T65632, T105325, or T264104, we will need to update code in more than one place at once. To prevent regressions, create an integration test which tests the whole pipeline, from the request submission to variable evaluation. Edits are simulated using action=edit API call because the hook AbuseFilter uses is run from EditPage. To increase confidence in test coverage, remove some annotations from AbuseFilterConsequencesTest or make them less greedy. Ideally, it would only test consequences. This patch includes refactoring of AbuseFilterCreateAccountTestTrait which now only inserts the user into the database if it really should be created. It also restores test coverage of some other classes. Change-Id: I661f4e0e2bcac4770e499708fca4e4e153f31fed |
||
---|---|---|
.. | ||
integration | ||
unit | ||
AbuseFilterConsequencesTest.php | ||
AbuseFilterCreateAccountTestTrait.php | ||
AbuseFilterFilterUserTest.php | ||
AbuseFilterRowsAndFiltersTestTrait.php | ||
AbuseFilterUploadTestTrait.php | ||
ConsequenceGetMessageTestTrait.php | ||
DegroupTest.php | ||
LazyVariableComputerDBTest.php | ||
RCVariableGeneratorTest.php | ||
SchemaChangesHandlerTest.php | ||
UpdateHitCountWatcherTest.php |