wiki.techinc.nl/tests/phpunit/unit/includes
Máté Szabó b99dcc23bc parser: Gracefully handle invalid ParsoidRenderID keys
Why:

- ParsoidRenderID::newFromKey() validates incoming keys and throws an
  InvalidArgumentException if a required key component was missing.
- It does so by eagerly destructuring the return value of explode(),
  which causes a PHP Notice for invalid inputs as the expected offsets
  won't exist then.

What:

- Check the count of key parts before destructuring.
- Add unit tests.

Bug: T385567
Change-Id: I1d936ae038f85ffa2e5d1d3d8a75fdc75e4c8ef8
(cherry picked from commit eec130925c081c2da1c475f9a9ce719e6838ca51)
2025-02-04 14:54:31 +00:00
..
actions tests: Use namespaced classes (2) 2024-06-13 23:21:02 +02:00
api Add namespace to includes/api classes 2024-09-25 19:31:14 +00:00
auth Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
block Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
cache tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
CommentFormatter tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
composer/PhpUnitSplitter Add phpunit:parallel:extensions composer command 2024-07-17 12:32:35 +02:00
config Config: Widen @covers tags 2024-07-24 18:02:48 +02:00
content tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
dao Remove all @package comments 2024-05-10 13:53:15 +02:00
db Add namespace to remaining parts of Wikimedia\Mime and Wikimedia\Stats 2024-09-27 16:19:10 -04:00
debug tests: Add Tests to PHP namespacing 2024-02-16 19:10:11 +00:00
deferred tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
diff tests: Use namespaced classes (2) 2024-06-13 23:21:02 +02:00
edit parser: Gracefully handle invalid ParsoidRenderID keys 2025-02-04 14:54:31 +00:00
editpage Use explicit nullable type on parameter arguments 2024-10-23 17:20:01 +00:00
exception tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
Feed
filebackend Use namespaced classes 2024-10-21 20:41:20 +02:00
filerepo/file tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
GlobalFunctions Remove wfRemoveDotSegments, deprecated since 1.39 2024-09-06 22:00:09 +03:30
historyblob tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
HookContainer AutoLoader: Use require_once rather than require 2024-10-24 01:36:18 +00:00
Html tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
htmlform htmlform: Add missing documentation to class properties 2024-09-14 11:49:05 +00:00
http
import tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
installer installer: Consistently use double quotes when outputting settings 2024-09-27 14:53:46 +02:00
interwiki tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
jobqueue Add namespace to remaining parts of Wikimedia\Mime and Wikimedia\Stats 2024-09-27 16:19:10 -04:00
json [JsonCodec] Use wikimedia/json-codec to implement JsonCodec 2024-10-15 20:09:51 -04:00
language tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
libs tests: Disable flaky test ClockTest::testShouldReturnCurrentTime 2024-11-22 17:10:22 +00:00
linker schema: Drop old pagelinks columns 2024-06-18 21:13:38 +02:00
mail Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
media tests: Use const for some static data in test files 2024-09-01 23:24:11 +02:00
Message Make Message and MessageValue compatible 2024-10-19 15:00:07 +02:00
objectcache objectcache: Add support for sister keys in SqlBagOStuff 2024-10-09 12:15:52 +02:00
page Use explicit nullable type on parameter arguments 2024-10-23 17:20:01 +00:00
ParamValidator/TypeDef Add namespace to includes/api classes 2024-09-25 19:31:14 +00:00
parser Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
password Merge "tests: Use namespaced classes (2)" 2024-06-14 00:05:10 +00:00
Permissions status: Log getMessage()/getWikiText() calls on good Statuses 2024-10-04 18:32:24 +02:00
poolcounter
preferences tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
recentchanges recentchanges: Move rcfeed/ to includes/recentchanges/RCFeed/ 2024-08-29 03:51:40 +01:00
registration Add a test freezing extension.schema.v1.json in it current form 2024-10-23 19:53:38 +00:00
Request tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
ResourceLoader tests: Use const for some static data in test files 2024-09-01 23:24:11 +02:00
Rest Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
Revision Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
revisionlist Add MediaWiki\RevisionList namespace to the related classes 2024-05-21 15:12:05 +03:30
search tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
session Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
Settings tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
shell tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
site tests: Namespace Site classes 2024-02-17 00:50:52 +00:00
skins Hard deprecate soft deprecated skin methods 2024-10-30 21:22:46 +00:00
specials/formfields tests: Use namespaced classes (2) 2024-06-13 23:21:02 +02:00
Storage Replace uses of deprecated ChangeTags static methods 2024-10-16 13:30:12 -04:00
StubObject tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
tidy tests: Use const for some static data in test files 2024-09-01 23:24:11 +02:00
title tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
user ConditionalDefaultsLookup: allow to dynamically add conditions for evaluation 2024-10-16 17:39:12 +02:00
utils utils: Add missing documentation to class properties 2024-09-01 14:40:01 +00:00
watchlist tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
widget test: Add PHPUnit tests for UsersMultiselectWidget 2024-02-09 21:54:47 +00:00
WikiMap tests: Fix @covers and @coversDefaultClass to have leading \ 2024-02-16 22:43:56 +00:00
xml Add namespace and deprecation alias to Xml and XmlSelect 2024-05-16 15:23:14 +03:30
FactoryArgTestTrait.php
SetupDynamicConfigTest.php tests: Use namespaced classes 2024-10-21 18:53:02 +02:00