From ace0b1412f3f97f96154b3e23b5be959e9f30f6e Mon Sep 17 00:00:00 2001 From: Isabelle Hurbain-Palatin Date: Sun, 1 Dec 2024 17:23:46 +0100 Subject: [PATCH] Replace uses of deprecated ParserOutput::getText() Bug: T293512 Change-Id: I966b0bcac5b5a9ae09f8243dd1fcee2e7c731515 --- tests/phpunit/integration/ParserIntegrationTests.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/phpunit/integration/ParserIntegrationTests.php b/tests/phpunit/integration/ParserIntegrationTests.php index b74b85e44..bd10dc393 100644 --- a/tests/phpunit/integration/ParserIntegrationTests.php +++ b/tests/phpunit/integration/ParserIntegrationTests.php @@ -90,7 +90,7 @@ class ParserIntegrationTests extends MediaWikiIntegrationTestCase { $parserOptions1->setOption( 'math', MathConfig::MODE_SOURCE ); $render = $parserOutputAccess->getCachedParserOutput( $page, $parserOptions1 ); $this->assertNotNull( $render ); - $this->assertStringContainsString( "source:TEST_FORMULA", $render->getText() ); + $this->assertStringContainsString( "source:TEST_FORMULA", $render->getRawText() ); // Now render with 'mathml' and make sure we didn't get the cached output $parserOptions2 = ParserOptions::newCanonical( 'canonical' ); @@ -108,7 +108,7 @@ class ParserIntegrationTests extends MediaWikiIntegrationTestCase { $this->assertNotNull( $cachedWithDummy1 ); $this->assertStringContainsString( "source:TEST_FORMULA", - $cachedWithDummy1->getText() + $cachedWithDummy1->getRawText() ); // Fetch from cache with mathml @@ -116,7 +116,7 @@ class ParserIntegrationTests extends MediaWikiIntegrationTestCase { $this->assertNotNull( $cachedWithDummy2 ); $this->assertStringContainsString( "mathml:TEST_FORMULA", - $cachedWithDummy2->getText() + $cachedWithDummy2->getRawText() ); } @@ -131,7 +131,7 @@ class ParserIntegrationTests extends MediaWikiIntegrationTestCase { PageReferenceValue::localReference( NS_MAIN, __METHOD__ ), $po ) - ->getText(); + ->getRawText(); $this->assertStringMatchesFormat( '%Amathml:formula%A', $res ); } }