aboutsummaryrefslogtreecommitdiffstats
path: root/tests/common
diff options
context:
space:
mode:
authorIsabelle Hurbain-Palatin <ihurbainpalatin@wikimedia.org>2024-05-16 11:59:53 +0200
committerC. Scott Ananian <cscott@cscott.net>2024-05-17 09:47:18 -0400
commitda6f716c410b9fd42f16896309a4ec2071f15632 (patch)
tree75a513a2e57ab5986e2a85fface44108e6c97355 /tests/common
parent15a2c2cfa3957752f47e44150d6d1f31064e25e9 (diff)
downloadmediawikicore-da6f716c410b9fd42f16896309a4ec2071f15632.tar.gz
mediawikicore-da6f716c410b9fd42f16896309a4ec2071f15632.zip
Fix serialization errors in PageBundle extensiondata
When going through a ContentDOMTransformStage, we try to move the PageBundle when transforming the document from and to DOM. In the current version of this code, this adds DataParsoid, a non-serializable class, to ExtensionData, which breaks on ParserCache storage in later steps. This patch is pretty hacky, but it transforms the PageBundle structure back to a stdClass so that it can be re-serialized before cache insertion. The added test fails without this patch. Hopefully we'll get rid of these hacks when using a HTMLHolder later. Bug: T365036 Change-Id: Icc74edd43ea5098faebc21a084b6d483d6ab99d1
Diffstat (limited to 'tests/common')
-rw-r--r--tests/common/TestsAutoLoader.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/common/TestsAutoLoader.php b/tests/common/TestsAutoLoader.php
index 1a95a49c4da2..90b040e75604 100644
--- a/tests/common/TestsAutoLoader.php
+++ b/tests/common/TestsAutoLoader.php
@@ -148,6 +148,7 @@ $wgAutoloadClasses += [
'LogFormatterTestCase' => "$testDir/phpunit/includes/logging/LogFormatterTestCase.php",
# tests/phpunit/includes/OutputTransform
+ 'MediaWiki\\Tests\\OutputTransform\\DummyDOMTransformStage' => "$testDir/phpunit/includes/OutputTransform/DummyDOMTransformStage.php",
'MediaWiki\\Tests\\OutputTransform\\TestUtils' => "$testDir/phpunit/includes/OutputTransform/TestUtils.php",
'MediaWiki\\Tests\\OutputTransform\\OutputTransformStageTestBase' => "$testDir/phpunit/includes/OutputTransform/OutputTransformStageTestBase.php",