* parseAsInterface() if $interface is true.
*/
public function parse( $text, $linestart = true, $interface = false, $language = null ) {
+ wfDeprecated( __METHOD__, '1.33' );
return $this->parseInternal(
$text, $this->getTitle(), $linestart, /*tidy*/false, $interface, $language
)->getText( [
* Parser::stripOuterParagraph($outputPage->parseAsContent(...)).
*/
public function parseInline( $text, $linestart = true, $interface = false ) {
+ wfDeprecated( __METHOD__, '1.33' );
$parsed = $this->parseInternal(
$text, $this->getTitle(), $linestart, /*tidy*/false, $interface, /*language*/null
)->getText( [
* @param string $expectedHTML Expected return value for parseInline(), if different
*/
public function testParse( array $args, $expectedHTML ) {
+ $this->hideDeprecated( 'OutputPage::parse' );
$op = $this->newInstance();
$this->assertSame( $expectedHTML, $op->parse( ...$args ) );
}
$this->assertTrue( true );
return;
}
+ $this->hideDeprecated( 'OutputPage::parseInline' );
$op = $this->newInstance();
$this->assertSame( $expectedHTMLInline ?? $expectedHTML, $op->parseInline( ...$args ) );
}
* @covers OutputPage::parse
*/
public function testParseNullTitle() {
+ $this->hideDeprecated( 'OutputPage::parse' );
$this->setExpectedException( MWException::class, 'Empty $mTitle in OutputPage::parseInternal' );
$op = $this->newInstance( [], null, 'notitle' );
$op->parse( '' );
* @covers OutputPage::parseInline
*/
public function testParseInlineNullTitle() {
+ $this->hideDeprecated( 'OutputPage::parseInline' );
$this->setExpectedException( MWException::class, 'Empty $mTitle in OutputPage::parseInternal' );
$op = $this->newInstance( [], null, 'notitle' );
$op->parseInline( '' );