Commit graph

7 commits

Author SHA1 Message Date
Aaron Schulz
1238043eff Add MediaWikiIntegrationTestCase::assertArraySubmapSame()
Also fix PHPUnit 9 warning in PNGMetadataExtractorTest about $delta.

This should fix all of the integration test warning spam.

Bug: T244095
Change-Id: I0e2a76d5df2685ae5ad1498864e0b5f9db60c0cc
2020-03-19 15:53:59 -07:00
James D. Forrester
4f2d1efdda Coding style: Auto-fix MediaWiki.Classes.UnsortedUseStatements.UnsortedUse
Change-Id: I94a0ae83c65e8ee419bbd1ae1e86ab21ed4d8210
2020-01-10 09:32:25 -08:00
Max Semenik
eb3461d146 ApiQueryBlocksTest: fix assertions
arrayHasKey() only returns a constraint, an assertion is
needed to actually perform a check.

Change-Id: I33a6cc4ed8e002764438a23300c5d204649200ca
2019-12-10 16:39:50 +03:00
Thalia
e65a5b5882 Rename Block to MediaWiki\Block\DatabaseBlock
Keep Block as a deprecated class alias for DatabaseBlock.
Update calls to the Block constructor and Block static
methods from external classes.

Also update documentation in several places that refer to
blocks as Blocks.

Bug: T222737
Change-Id: I6d96b63ca0a84bee19486471e0a16a53a79d768a
2019-05-28 12:20:48 +01:00
David Barratt
6710e8c212
Prevent fatal PHP errors when PageRestriction::getTitle() returns null.
Update usages of PageRestriction::getTitle() to handle a null response.

Bug: T214763
Change-Id: Ied33e2c3c9442c47ae8084a97bb0921869fb9d49
2019-02-07 10:06:15 -05:00
David Barratt
8631ea7bf6 Add tests to ensure that NamespaceRestrictions are returned from Block APIs.
Bug: T204989
Change-Id: Ibe44da41e9efa6688615dc9b0712f9713d4e8158
2019-01-23 21:31:12 +00:00
David Barratt
b3014df3b6 List Partial Block details in ApiQueryBlocks and ApiQueryUserinfo.
The ApiQueryBlocks and ApiQueryUserinfo endpoints will now return whether or not the block is
sitewide or partial. Partial block restrictions can be returned with ApiQueryBlocks.

Bug: T197141
Change-Id: I76eb4cac4dc989c621a00a39996faebd0eb9892c
2018-10-24 16:26:32 +00:00