Replace getNativeData to getText for Math

Replace Content::getNativeData() calls with TextContent::getText() in Math extension.

Bug: T283679
Change-Id: Iaf3b7f82f14069374de8ede7b519d822f8d6010f
This commit is contained in:
russ-rogovetz 2022-04-18 11:31:33 +03:00 committed by Moritz Schubotz (physikerwelt)
parent 9e420ab960
commit 894c22989b
No known key found for this signature in database
GPG key ID: F803DB146DDF36C3

View file

@ -5,6 +5,8 @@
require_once __DIR__ . '/../../../maintenance/Maintenance.php';
use MediaWiki\Extension\Math\MathConfig;
use MediaWiki\Extension\Math\MathMathMLCli;
use MediaWiki\Extension\Math\MathRenderer;
use MediaWiki\MediaWikiServices;
class WfTest extends Maintenance {
@ -27,7 +29,10 @@ class WfTest extends Maintenance {
$title = Title::newFromText( $titleString );
if ( $title->exists() ) {
$article = new Article( $title );
$wikiText = $article->getPage()->getContent()->getNativeData();
/** @var TextContent $content */
'@phan-var TextContent $content';
$content = $article->getPage()->getContent();
$wikiText = $content->getText();
} else {
if ( $title == self::REFERENCE_PAGE ) {
$wgEnableScaryTranscluding = true;