From 72c4945a724267ba65d3df08ea34bbbf1aa59aa7 Mon Sep 17 00:00:00 2001 From: "C. Scott Ananian" Date: Fri, 9 Feb 2024 17:27:00 -0500 Subject: [ParserOutput] Rename $mText to $mRawText and ::setText() to ::setRawText() ParserOutput::getText() is not a simple getter, but does transformations on the "text" of the ParserOutput; the simple getter is named ::getRawText(). To maintain consistency, rename ParserOutput::setText() to ::setRawText() and the property name ParserOutput::$mText to ::$mRawText so future readers are not confused. The JSON property name as it appears in the serialized ParserCache is left as 'Text' so that we don't have any forward- or backward- rollback issues. Change-Id: I3ef34814ab9473cc70d0a6806e8c5a4a02b73491 --- tests/phpunit/includes/parser/ParserOutputTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/phpunit/includes/parser/ParserOutputTest.php') diff --git a/tests/phpunit/includes/parser/ParserOutputTest.php b/tests/phpunit/includes/parser/ParserOutputTest.php index 5b179dabd8f1..94164296e31e 100644 --- a/tests/phpunit/includes/parser/ParserOutputTest.php +++ b/tests/phpunit/includes/parser/ParserOutputTest.php @@ -228,7 +228,7 @@ class ParserOutputTest extends MediaWikiLangTestCase { public function testWrapperDivClass() { $po = new ParserOutput(); - $po->setText( 'Kittens' ); + $po->setRawText( 'Kittens' ); $this->assertStringContainsString( 'Kittens', $po->getText() ); $this->assertStringNotContainsString( 'getText() ); $this->assertSame( 'Kittens', $po->getRawText() ); @@ -485,11 +485,11 @@ EOF $this->assertTrue( $po->hasText() ); $po = new ParserOutput( null ); - $po->setText( '' ); + $po->setRawText( '' ); $this->assertTrue( $po->hasText() ); $po = new ParserOutput( 'foo' ); - $po->setText( null ); + $po->setRawText( null ); $this->assertFalse( $po->hasText() ); } -- cgit v1.2.3