aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/unit/includes/import
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix @covers and @coversDefaultClass to have leading \Reedy2024-02-161-1/+1
| | | | Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
* WikiImporter: Pass Authority for permissions instead of global contextBartosz DziewoƄski2023-12-111-1/+1
| | | | | | | | | | | | | | | Pass Authority to WikiImporter constructor, instead of looking at the user from RequestContext::getMain(), and skipping this check if $wgCommandLineMode is true. Maintenance scripts now use UltimateAuthority, to match the original intent of skipping permission checks, see 2ed55f42 / r96311. The Authority parameter to WikiImporterFactory::getWikiImporter() is optional for now for backwards-compatibility. It should become required later after deprecation. Change-Id: Iea1d03dcdcbda2f9a9adbff1b0d319efd22c4d86
* [php8.1] Make WikiImporterFactoryTest use better mock for ImportSourceBrian Wolff2022-07-241-0/+12
| | | | | | | | | On php8.1, this test was throwing a warning because readChunk() returned null, which confused things. Mock out atEnd() method to make it look like a zero byte stream to avoid the issue Bug: T313663 Change-Id: I0d7271a07a31dc0cbe6108748d9cabb2c8f04f41
* WikiImporter: inject servicesZabeMath2021-05-241-0/+31
This patch injects services into WikiImporter. It also adds a WikiImporterFactory service for creating WikiImporter instances. Change-Id: I2966297e5728fca1ae8280361f1008cef6c6041b