mediawiki-extensions-AbuseF.../tests/phpunit
DannyS712 745d911d68 Add tests for afl_rev_id being set
Regression tests to make sure T286140 does not
happen again.

In the process, discovered what caused that bug
with afl_rev_id not being set: EditRevUpdater::updateRev()
compares the WikiPage given in the PageSaveComplete hook
to the one given to it by AbuseFilterHooks from
onEditFilterMergedContent, and compares the two using
`===`, meaning that they must refer to the same underlying
object. That bug was caused because AbuseFilterHooks
changed to providing a different object, despite still
referring to the same underlying page.

We should probably change that behavior in EditRevUpdater,
but for now updated AbuseFilterConsequencesTest to pass
the same object around by using RequestContext::setWikiPage()
and providing the WikiPage object to
MediaWikiIntegrationTestCase::editPage().

Bug: T286140
Change-Id: I6562f513c463538af6b59b12a64564b254024613
2021-07-04 08:04:06 +00:00
..
integration Merge "Improve test coverage of API modules" 2021-04-18 16:03:25 +00:00
unit User mock must return Block instance from getBlock. 2021-06-08 17:12:48 +02:00
AbuseFilterBlockTest.php Update DatabaseBlock construct option 'by' to use User Identity only 2021-05-31 17:36:55 +03:00
AbuseFilterConsequencesTest.php Add tests for afl_rev_id being set 2021-07-04 08:04:06 +00:00
AbuseFilterCreateAccountTestTrait.php Move remaining classes to own namespace 2021-01-04 12:11:58 +01:00
AbuseFilterFilterUserTest.php Add a service to retrieve the filter user 2020-10-26 14:06:53 +01:00
AbuseFilterRowsAndFiltersTestTrait.php Introduce subclasses of Filter with specific use cases 2021-01-17 00:47:29 +00:00
AbuseFilterSaveTest.php build: Updating composer dependencies 2021-05-02 06:41:54 +00:00
AbuseFilterUploadTestTrait.php Use FauxRequest::setUpload in AbuseFilterUploadTestTrait::doUpload 2021-01-30 00:16:14 +01:00
ConsequenceGetMessageTestTrait.php Construct UserIdentityValue without actorId 2021-03-26 11:00:56 +01:00
ConsequencesExecutorTest.php Introduce subclasses of Filter with specific use cases 2021-01-17 00:47:29 +00:00
DegroupTest.php Use static closures where safe to use 2021-04-30 20:55:35 +02:00
LazyVariableComputerDBTest.php Pass a user to WikiPage::prepareContentForEdit() 2021-06-24 04:01:33 +00:00
RangeBlockTest.php Construct UserIdentityValue without actorId 2021-03-26 11:00:56 +01:00
RCVariableGeneratorTest.php Improve function and property documentation 2021-01-16 00:31:09 +01:00
SchemaChangesHandlerTest.php Improve coverage for hooks 2021-01-14 22:49:24 +01:00
UpdateHitCountWatcherTest.php Update hit counts in a DeferredUpdate 2021-02-21 03:15:16 +00:00