wiki.techinc.nl/tests/phpunit/includes
C. Scott Ananian df9756b9a1 Make Content JsonCodecable
By default this uses the existing ContentHandler::serializeContent() and
::unserializeContent() methods.  But in cases where existing PHP
serialization preserved fields that ::serializeContent() did not,
provide an additional ContentHandler::serializeContentToJsonArray()
and ContentHandler::deserializeContentFromJsonArray() methods which
can be used.  Use these in WikitextContentHandler to preserve the
PST flags.

Added test cases and a ContentSerializationTestTrait to make it
easy to ensure forward- and backward-compatibility in accord with

https://www.mediawiki.org/wiki/Manual:Parser_cache/Serialization_compatibility

The new JsonCodecable codec will be used to improve PageEditStashContent
serialization, which no longer has to PHP-serialize its Content object.
New test case added demonstrating compatibility.

Bug: T264389
Bug: T161647
Change-Id: I544625136088164561b9169a63aed7450cce82f5
(cherry picked from commit 21576d6c1893079777a1a51d0f81c4941c58e376)
2025-09-05 16:12:09 -04:00
..
actions tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
api BlockListPagerTest: Fixup tests for pre REL1_44 2025-07-01 11:46:47 +10:00
auth Use anonymous user when creating named account from temp account 2025-05-29 12:06:33 +00:00
block Test AutoblockExemptionList 2024-10-16 14:04:34 +01:00
cache tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
Category tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
changetags Parameterize ChangeTags::buildTagFilterSelector to support various tag sets 2025-04-03 18:24:39 +01:00
collation
CommentStore tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
config
content Make Content JsonCodecable 2025-09-05 16:12:09 -04:00
db rdbms: clear replica snapshots in (begin|commit|rollback)PrimaryChanges() 2024-10-09 20:34:25 +00:00
debug debug: Migrate E_USER_ERROR to throw Error in DeprecationHelper 2025-06-13 07:40:14 +00:00
deferred rdbms: clear replica snapshots in (begin|commit|rollback)PrimaryChanges() 2024-10-09 20:34:25 +00:00
diff tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
editpage tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
exception tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
export Add namespace to maintenance/includes classes 2024-10-09 11:02:09 -04:00
ExternalLinks ExternalLinks: fix mailto: links reversal 2025-02-28 16:33:54 +00:00
externalstore tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
filebackend tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
filerepo filerepo: No exception on redirect without width in ThumbnailEntryPoint 2025-04-29 20:01:15 +00:00
GlobalFunctions Deprecate wfArrayDiff2() 2024-11-04 19:34:41 +00:00
HookContainer
Html SECURITY: Ensure emitted HTML is safe against Unicode NFC normalization 2025-04-10 15:56:06 +01:00
http
import recentchanges: Use current time for imported revision category changes 2024-10-23 11:43:34 +00:00
installer [DatabaseUpdater] Don't interact with updatelog on virtual domains 2024-10-17 15:12:35 +01:00
interwiki Add namespace to remaining parts of Wikimedia\ObjectCache 2024-09-27 16:19:10 -04:00
jobqueue RefreshLinksJob: Don't retry job if "Revision x is not current" is returned 2024-11-19 16:08:11 +00:00
language SECURITY: Ensure emitted HTML is safe against Unicode NFC normalization 2025-04-10 15:56:06 +01:00
languages Switch over a bunch of class_alias uses to actuals 2024-10-03 17:09:36 +00:00
libs tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
linkeddata
linker phpunit: Remove superfluous Title::clearCaches() calls 2025-05-27 12:37:31 +00:00
logging tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
mail tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
media WebPHandler: Read all of the VP8L canvas height 2025-08-26 12:21:30 +00:00
Message Make Message and MessageValue compatible 2024-10-19 15:00:07 +02:00
Navigation
objectcache objectcache: Add regression test for MultiWrite dependency injection 2024-09-23 15:07:23 -07:00
Output Deprecate OutputPage::{get,set}IndexPolicy() 2024-10-17 23:51:12 -04:00
OutputTransform SECURITY: Ensure emitted HTML is safe against Unicode NFC normalization 2025-04-10 15:56:06 +01:00
page tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
pager tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
ParamValidator/TypeDef Replace uses of deprecated ChangeTags static methods 2024-10-16 13:30:12 -04:00
parser ParserCacheSerializationTestCases: distinguish empty ToC from missing ToC 2025-07-23 01:31:23 +00:00
password tests: Use const for some static data in test files 2024-09-01 23:24:11 +02:00
Permissions PermissionManager: Differentiate between cascading protection of file content and file pages 2025-03-24 13:31:34 +00:00
poolcounter tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
preferences tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
profiler
recentchanges Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
registration tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
Request
ResourceLoader phpunit: Remove superfluous Title::clearCaches() calls 2025-05-27 12:37:31 +00:00
Rest
Revision rdbms: fix table prefixing in "FOR UPDATE" clause generation in Postgres 2025-06-24 22:33:30 +01:00
search phpunit: Remove superfluous Title::clearCaches() calls 2025-05-27 12:37:31 +00:00
session session: Do not set session.use_trans_sid 2025-01-06 22:12:05 +00:00
shell
site tests: Consistently use class_alias comments like elsewhere 2024-09-25 09:48:46 -04:00
SiteStats Add namespace to remaining parts of Wikimedia\ObjectCache 2024-09-27 16:19:10 -04:00
skins tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
sparql
specialpage Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
specials BlockListPagerTest: Fixup tests for pre REL1_44 2025-07-01 11:46:47 +10:00
Status Make Message and MessageValue compatible 2024-10-19 15:00:07 +02:00
Storage Merge "Use explicit nullable type on parameter arguments" 2024-10-16 23:10:14 +00:00
title phpunit: Remove superfluous Title::clearCaches() calls 2025-05-27 12:37:31 +00:00
upload tests: Add test cases for UploadFromChunks 2025-04-13 10:43:22 +00:00
user BotPasswordTest: Add a few more test cases provideCanonicalizeLoginData 2025-03-13 20:58:18 +00:00
utils Remove CryptHKDF and MWCryptHKDF 2024-11-10 22:49:37 -05:00
watchlist tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
WikiMap
xml
AutoLoaderTest.php tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
MediaWikiServicesTest.php tests: Add missing documentation to class properties 2024-09-18 17:25:42 +00:00
MockServiceWiring.php
SampleTest.php
TestUser.php
TestUserRegistry.php