mediawiki-extensions-AbuseF.../tests/phpunit
Matěj Suchánek 702d77e3ce Create real integration test for variables
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
2022-11-26 18:51:38 +01:00
..
integration Create real integration test for variables 2022-11-26 18:51:38 +01:00
unit Create real integration test for variables 2022-11-26 18:51:38 +01:00
AbuseFilterConsequencesTest.php Create real integration test for variables 2022-11-26 18:51:38 +01:00
AbuseFilterCreateAccountTestTrait.php Create real integration test for variables 2022-11-26 18:51:38 +01:00
AbuseFilterFilterUserTest.php Create real integration test for variables 2022-11-26 18:51:38 +01:00
AbuseFilterRowsAndFiltersTestTrait.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
AbuseFilterUploadTestTrait.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
ConsequenceGetMessageTestTrait.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
DegroupTest.php Remove $info argument from ReversibleConsequence::revert 2022-06-08 11:59:18 +02:00
LazyVariableComputerDBTest.php Create real integration test for variables 2022-11-26 18:51:38 +01:00
RCVariableGeneratorTest.php Create real integration test for variables 2022-11-26 18:51:38 +01:00
SchemaChangesHandlerTest.php build: Updating dependencies 2021-07-21 18:51:18 +00:00
UpdateHitCountWatcherTest.php tests: Use DBConnRef, not IDatabase, as retval of getConnectionRef 2021-08-31 21:45:10 +02:00