aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | extension.json: DomainEventIngresses instead of DomainEventSubscribersdaniel2025-03-202-10/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - "ingress" is the more meaningful concept when implementing listeners What: - Add support for DomainEventSubscribers in extension.json Bug: T389033 Change-Id: I458bd7cd439a2e3213458d994cf87affa5da966b
* | | | | | | | | Merge "PageUpdater: move revert tag update logic"jenkins-bot2025-03-202-19/+22
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | PageUpdater: move revert tag update logicdaniel2025-03-192-19/+22
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert tag updates belong to change tracking, so move them out of the content component. Note: The behavior of updateRevertTagAfterPageUpdated() is covered by the existing RevertedTagUpdateIntegrationTest. Bug: T388573 Change-Id: I38cb5622238bc674ad97d6f47ecd4b8d09f45349
* | | | | | | | | Merge "block: Add cleanupBlocks.php"jenkins-bot2025-03-201-0/+145
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | block: Add cleanupBlocks.phpTim Starling2025-03-191-0/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a script to clean up referential integrity issues in the block and block_target table. Most notably, merge duplicate block_target rows and delete orphan block_target rows, issues which exist in production. Bug: T389301 Change-Id: I77e1bc308a107a3155d23fa43fe830a394f157ba
* | | | | | | | | | Merge "DomainEvents: remove "AfterCommit" suffix from event handlers"jenkins-bot2025-03-201-1/+1
|\ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / |/| | | | | | | | |
| * | | | | | | | | DomainEvents: remove "AfterCommit" suffix from event handlersAaron Schulz2025-03-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id206c7c0ee14da988445d988f1bab2441860a65b
* | | | | | | | | | Merge "collation: Add new collation uppercase-ckb for Central Kurdish"jenkins-bot2025-03-191-4/+11
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | collation: Add new collation uppercase-ckb for Central KurdishBrian Wolff2025-03-191-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously this used the uca-xx-ckb collation. However this gave incorrect results. That collation has been deprecated in this commit. This also adds support for groups of equal weight characters in CustomUppercaseCollation Bug: T310051 Change-Id: I1e122af6be94e3484f735f150ac639dfb99f681f
* | | | | | | | | | | Merge "SpecialBlock [Codex]: validate block ID when passed in via URL parameter"jenkins-bot2025-03-191-0/+27
|\ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / |/| | | | | | | | | |
| * | | | | | | | | | SpecialBlock [Codex]: validate block ID when passed in via URL parameterMusikAnimal2025-03-181-0/+27
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures the target is set properly, and thus auto-loading the form will also work (as $this->codeFormData['blockTargetExists'] is set). Use server-provided blockId in SpecialBlock.vue, and move the loading of blocks from URL param as well as the confirmCloseWindow logic to an onMounted() hook. Remove blockId from Jest fixture; this wasn't even being set by the server but we were pretending it was. Adjust other tests accordingly. Bug: T389198 Change-Id: Icf5130dc0a873b991513b4034e51ed006659f262
* | | | | | | | | | Namespace all remaining files in includes/loggingJames D. Forrester2025-03-1927-59/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T353458 Change-Id: Ibe1810f1c71316a9124e1dc6ae405097dafd5267
* | | | | | | | | | Namespace all remaining files in includes/actionsJames D. Forrester2025-03-195-5/+10
| |_|_|_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T353458 Change-Id: Id3ca24e22877e544b707a8a527a58e00cc1bc247
* | | | | | | | | Namespace all remaining files in includes/filerepoJames D. Forrester2025-03-1913-21/+25
| |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T353458 Change-Id: I35864ad9bd48701703c51367d62f8ebde963c52d
* | | | | | | | Merge "DatabaseBlockStore: bring bl_timestamp to current when updating blocks"jenkins-bot2025-03-191-0/+3
|\ \ \ \ \ \ \ \
| * | | | | | | | DatabaseBlockStore: bring bl_timestamp to current when updating blocksMusikAnimal2025-03-191-0/+3
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is because bl_timestamp is compared against bl_expiry when generating relative timestamps in ApiQueryBlocks and BlockLogFormatter (see Ie88ca47053b). Bug: T389275 Change-Id: I3b1adc7095a317785c7d34694a017c8a802406c8
* | | | | | | | Merge "Add regression test for null rollback"jenkins-bot2025-03-191-5/+48
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | |
| * | | | | | | Add regression test for null rollbackMatěj Suchánek2025-03-151-5/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up to I7bc38f07d1edea71e2dcd62781ec1c7f1fb0d261. Change-Id: I4317f62088fb002583cff03266997ae619a92266
* | | | | | | | Merge "ApiQueryBlock: Don't return page restrictions when pages were deleted"jenkins-bot2025-03-191-1/+2
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | |
| * | | | | | | ApiQueryBlock: Don't return page restrictions when pages were deletedDayllan Maza2025-03-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Special:Block and Special:BlockList ignore restrictions if the page has been removed. ApiQueryBlocks now matches that behavior Bug: T388511 Change-Id: I525fbf73eec6f4a62bd6244b2a14e71130c7e602
* | | | | | | | Merge "EventSubscriberBase: rename to EventIngressBase"jenkins-bot2025-03-182-12/+8
|\ \ \ \ \ \ \ \
| * | | | | | | | EventSubscriberBase: rename to EventIngressBasedaniel2025-03-182-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - "ingress" better describes the purpose of objects that use this base class. "subscriber" is merely a mechanism for registering listeners. What: - Rename EventSubscriberBase to EventIngressBase (leaving an alias in place) - Improve documentation of the base class - Clean up some unused code in the base class Bug: T389033 Change-Id: Ib557aea12cc89b7365cabe22a6848c2a38c725ca
* | | | | | | | | Merge "Avoid non-static providers in MessageTest"jenkins-bot2025-03-181-23/+50
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Avoid non-static providers in MessageTestTim Starling2025-03-101-23/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just use arrow functions, a simple solution for this case. Bug: T332865 Change-Id: I26f7fb87be2f93df4cb0e3c59b23e23668ebdc12
* | | | | | | | | | Merge "Download latest phpunit results cache before parallel tests"jenkins-bot2025-03-185-10/+50
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Download latest phpunit results cache before parallel testsArthur Taylor2025-03-185-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The PHPUnit parallel test implementation has support for balancing buckets by duration when timing information is provided for the test classes. Update the `phpunit:prepare-parallel:...` action to download the latest phpunit results cache file and process it as part of the test suite bucket / `split_group` creation process. If the file is empty or cannot be download, proceed as before - simply put the same number of test classes in each bucket. Bug: T378797 Bug: T384927 Change-Id: Idd167ef8b1d448c236713b1683f768abb6e12655
* | | | | | | | | | | Namespace all remaining files in includes/pageJames D. Forrester2025-03-1813-40/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: T353458 Change-Id: I7a9c74f2106655d41ae029742090253f541bd4a6
* | | | | | | | | | | Merge "Fix uses of TempFSFileFactory's old class alias"jenkins-bot2025-03-184-5/+5
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Fix uses of TempFSFileFactory's old class aliasJames D. Forrester2025-03-174-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up to 0fe5cc829ecfc7b0476d69821c446516483d24fe. Bug: T382910 Change-Id: I8bd2e5d5815f37944ec4bfc5f586701a1116069b
* | | | | | | | | | | | Merge "DomainEvents: Don't pass $dbProvider to listeners"jenkins-bot2025-03-181-4/+1
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | DomainEvents: Don't pass $dbProvider to listenersdaniel2025-03-151-4/+1
| | |_|_|_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - it was mainly intended for synchronous invocation - I have not come across a practical use case where it would have been useful - listeners generally don't interact with the database directly, but use some sort of DAO. What: - Don't pass $dbProvider in EventDispatchEngine::invoke Bug: TBD Change-Id: I4fbb3ff53d814988923ac24738237b26b89c138c
* | | | | | | | | | | | Merge "Add uppercase collation for Inari Sámi"jenkins-bot2025-03-181-0/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | |
| * | | | | | | | | | | Add uppercase collation for Inari SámiJon Harald Søby2025-03-161-0/+1
| | |_|_|_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add custom uppercase collation for Inari Sámi, which isn't properly supported in ICU (two letters are missing, so they appear at the end of the list if you try to use `uca-smn-u-kn`. Bug: T388970 Change-Id: I3ec1966f1621dce0bb266281a54fc2c7cf08f405
* | | | | | | | | | | Merge "DomainEvents: Rename getOldRevision and getNewRevision"jenkins-bot2025-03-178-26/+26
|\ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / / |/| | | | | | | | | |
| * | | | | | | | | | DomainEvents: Rename getOldRevision and getNewRevisiondaniel2025-03-158-26/+26
| | |_|_|_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Why: - Use consistent naming scheme based on "before" and "after" to represent the change. What: - rename getOldRevision to getLatestRevisionBefore - rename getNewRevision to getLatestRevisionAfter Bug: T388588 Change-Id: I30078f606f457981987d95def5b2aaae181f0690
* | | | | | | | | | Fix expensive computations before cache hit and add additional caching to ↵Dylan F2025-03-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DefaultOptionsLookup * Moved getCacheKey to UserOptionsLookup * Added caching to DefaultOptionsLookup after conditional options * Move expensive getDefaultOptions to after cache miss Bug: T386883 Change-Id: I307e1d30e84396b56d919993aef4d411ecae8ea1
* | | | | | | | | | media: Make SvgHandler respect physicalWidth when building URL for thumbAmir Sarabadani2025-03-151-0/+5
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Almost every other media type prefer physicalWidth over width param except SVG because it wasn't really needed and svg has a dedicated ::makeParamString() function that doesn't call its parent. This is making steps not work for SVG files. Locally worked just fine and fixes the issue. Bug: T360589 Change-Id: Ifcd1693262b64256e310e68d93fc08af5b6e83df
* | | | | | | | | Merge "tests: Clean up mock builders in WatchedItemStoreUnitTest"jenkins-bot2025-03-141-268/+96
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | |
| * | | | | | | | tests: Clean up mock builders in WatchedItemStoreUnitTestthiemowmde2025-03-111-268/+96
| | |_|/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I believe this makes the test code quite a bit more readable. It especially avoids a lot of repetition. * Make use of the upstream no-op mocks. * Make use of the new fn() syntax. * Remove unused code. Change-Id: I17c3b4191411f13ad9fe058e885149b45394a54a
* | | | | | | | Merge "Remove inline @var docs that aren't needed"jenkins-bot2025-03-147-12/+0
|\ \ \ \ \ \ \ \
| * | | | | | | | Remove inline @var docs that aren't neededthiemowmde2024-11-057-12/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not needed (any more) because the code already contains enough @return docs and such. Change-Id: If461fa035d2c646878540565b3087a74c6628552
* | | | | | | | | Merge "Avoid constructing Title from LinkTarget where not needed"jenkins-bot2025-03-141-1/+1
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Avoid constructing Title from LinkTarget where not neededthiemowmde2025-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I just find this combination of method calls confusing. A revision can not be addressed via a LinkTarget. We can only end having a revision when we started with a proper PageIdentity. This is actually hard-coded in the RevisionRecord constructor. So why not use that PageIdentity when we have the guarantee that it's available? I believe the proposed replacement is also faster. Not only because we avoid calling some extra code. The new code makes sure that the page ID is never lost and doesn't need to be queried again. Change-Id: I3ea3dd8b52566cc9883f3328c7748584fb3d05ff
* | | | | | | | | | Merge "Drop small bits of duplication from MediaWikiIntegrationTestCase"jenkins-bot2025-03-141-17/+5
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Drop small bits of duplication from MediaWikiIntegrationTestCasethiemowmde2025-01-211-17/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main benefit I see here is that the more modern syntax avoids duplication and makes the code more readable. Change-Id: Ia24c3208fed9b194f6061e4b5ee8e5c1e3ec15f9
* | | | | | | | | | | Merge "parser: Fix zero-based (?) month in MagicVariableTest"jenkins-bot2025-03-141-6/+1
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | parser: Fix zero-based (?) month in MagicVariableTestthiemowmde2024-08-081-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Note this is only test setup. It probably doesn't make a difference. Still I found it quite confusing. The month is not zero based. The behavior of the new formular is like this: 1 → 1 2 → 2 … 12 → 12 13 → 1 14 → 2 … and so on. I also made sure 0 wraps to 12, just to be sure. Change-Id: I8eba45594f639e48293fe8b006bfc708321e1ae3
* | | | | | | | | | | | Merge "filerepo: Test behavior of wgThumbnailSteps beyond its range"jenkins-bot2025-03-141-1/+12
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / / / / / |/| | | | | | | | | | |
| * | | | | | | | | | | filerepo: Test behavior of wgThumbnailSteps beyond its rangeTimo Tijhof2025-03-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follows-up I9110d4ac9b (bf7f5d3caf), to confirm that widths outside the configured step range are unaffected and do not get rounded down (wrong direction), nor rounded too far up to some other constant. Bug: T360589 Change-Id: Ifbb7039744b9a1625cddf7a9eec9882d0d9d732a
* | | | | | | | | | | | Merge "DomainEvents: Rename PageEvent and PageUpdatedEvent"jenkins-bot2025-03-1410-78/+87
|\ \ \ \ \ \ \ \ \ \ \ \