* or else addWikiTextAsContent() if $interface is false.
*/
public function addWikiText( $text, $linestart = true, $interface = true ) {
+ wfDeprecated( __METHOD__, '1.32' );
$title = $this->getTitle();
if ( !$title ) {
throw new MWException( 'Title is null' );
) {
global $wgParser;
+ if ( !$tidy ) {
+ wfDeprecated( 'disabling tidy', '1.32' );
+ }
+
$popts = $this->parserOptions();
$oldTidy = $popts->setTidy( $tidy );
$popts->setInterfaceMessage( (bool)$interface );
$op = $this->newInstance();
$this->assertSame( '', $op->getHTML() );
+ $this->hideDeprecated( 'OutputPage::addWikiText' );
$this->hideDeprecated( 'OutputPage::addWikiTextTitle' );
$this->hideDeprecated( 'OutputPage::addWikiTextWithTitle' );
$this->hideDeprecated( 'OutputPage::addWikiTextTidy' );
$this->hideDeprecated( 'OutputPage::addWikiTextTitleTidy' );
+ $this->hideDeprecated( 'disabling tidy' );
+
if ( in_array(
$method,
[ 'addWikiTextWithTitle', 'addWikiTextTitleTidy', 'addWikiTextTitle' ]
* @covers OutputPage::addWikiText
*/
public function testAddWikiTextNoTitle() {
+ $this->hideDeprecated( 'OutputPage::addWikiText' );
$this->setExpectedException( MWException::class, 'Title is null' );
$op = $this->newInstance( [], null, 'notitle' );