diff --git a/client/includes/Api/ApiFormatReference.php b/client/includes/Api/ApiFormatReference.php index 9972624e54..d6da2dc274 100644 --- a/client/includes/Api/ApiFormatReference.php +++ b/client/includes/Api/ApiFormatReference.php @@ -83,7 +83,7 @@ public function execute() { $parserOptions = ParserOptions::newFromContext( $this ); $parser = $this->parserFactory->getInstance(); $parser->parse( $wikitext, Title::makeTitle( 0, 'API' ), $parserOptions ); - $html = $parser->getOutput()->getText(); + $html = $parser->getOutput()->runOutputPipeline( $parserOptions, [] )->getContentHolderText(); $this->getResult()->addValue( $this->getModulePath(), 'html', $html ); break; default: diff --git a/client/tests/phpunit/integration/includes/DataAccess/ParserFunctions/PropertyParserFunctionIntegrationTest.php b/client/tests/phpunit/integration/includes/DataAccess/ParserFunctions/PropertyParserFunctionIntegrationTest.php index a7bc6bf521..e3d70e11f0 100644 --- a/client/tests/phpunit/integration/includes/DataAccess/ParserFunctions/PropertyParserFunctionIntegrationTest.php +++ b/client/tests/phpunit/integration/includes/DataAccess/ParserFunctions/PropertyParserFunctionIntegrationTest.php @@ -105,7 +105,7 @@ private function setAllowDataAccessInUserLanguage( $value ) { public function testPropertyParserFunction_byPropertyLabel() { $result = $this->parseWikitextToHtml( '{{#property:LuaTestStringProperty}}' ); - $this->assertSame( "
Lua :)\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "Lua :)\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -117,7 +117,7 @@ public function testPropertyParserFunction_byPropertyLabel() { public function testPropertyParserFunction_byPropertyId() { $result = $this->parseWikitextToHtml( '{{#property:P342}}' ); - $this->assertSame( "Lua :)\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "Lua :)\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -129,7 +129,7 @@ public function testPropertyParserFunction_byPropertyId() { public function testPropertyParserFunction_arbitraryAccess() { $result = $this->parseWikitextToHtml( '{{#property:P342|from=Q32488}}' ); - $this->assertSame( "Lua :)\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "Lua :)\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -141,7 +141,7 @@ public function testPropertyParserFunction_arbitraryAccess() { public function testPropertyParserFunction_multipleValues() { $result = $this->parseWikitextToHtml( '{{#property:P342|from=Q32489}}' ); - $this->assertSame( "Lua :), Lua :)\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "Lua :), Lua :)\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -153,7 +153,7 @@ public function testPropertyParserFunction_multipleValues() { public function testPropertyParserFunction_arbitraryAccessNotFound() { $result = $this->parseWikitextToHtml( '{{#property:P342|from=Q1234567}}' ); - $this->assertSame( '', $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( '', $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -167,7 +167,7 @@ public function testPropertyParserFunction_byNonExistent() { $this->assertMatchesRegularExpression( '/Lua :)\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "Lua :)\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -135,7 +135,7 @@ public function testStatementsParserFunction_byPropertyLabel() { public function testStatementsParserFunction_byPropertyId() { $result = $this->parseWikitextToHtml( '{{#statements:P342}}' ); - $this->assertSame( "Lua :)\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "Lua :)\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -147,7 +147,7 @@ public function testStatementsParserFunction_byPropertyId() { public function testStatementsParserFunction_arbitraryAccess() { $result = $this->parseWikitextToHtml( '{{#statements:P342|from=Q32488}}' ); - $this->assertSame( "Lua :)\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "Lua :)\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -161,7 +161,7 @@ public function testStatementsParserFunction_multipleValues() { $this->assertSame( "Lua :), Lua :)\n
", - $result->getText( [ 'unwrap' => true ] ) + $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); @@ -174,7 +174,7 @@ public function testStatementsParserFunction_multipleValues() { public function testStatementsParserFunction_arbitraryAccessNotFound() { $result = $this->parseWikitextToHtml( '{{#statements:P342|from=Q1234567}}' ); - $this->assertSame( '', $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( '', $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -199,7 +199,7 @@ public function testStatementsParserFunction_unknownEntityTypeAsValue() { $result = $this->parseWikitextToHtml( '{{#statements:P666|from=Q999}}' ); - $this->assertSame( "X303\n
", $result->getText( [ 'unwrap' => true ] ) ); + $this->assertSame( "X303\n
", $result->getRawText() ); $usageAccumulator = $this->newParserOutputUsageAccumulator( $result ); $this->assertArrayEquals( @@ -213,7 +213,7 @@ public function testStatementsParserFunction_byNonExistent() { $this->assertMatchesRegularExpression( '/