setTitle( $title );
$partial = new PageTitle( new SkinCitizen() );
$data = sprintf(
'
%s
',
'Foo Title (paren)'
);
$text = $partial->decorateTitle( $data );
$this->assertStringNotContainsString( 'mw-page-title-parenthesis', $text );
}
/**
* @covers \MediaWiki\Skins\Citizen\Partials\PageTitle
* @return void
* @throws MWException
*/
public function testDecorateTitle() {
$title = Title::makeTitle( NS_MAIN, 'Foo' );
RequestContext::resetMain();
RequestContext::getMain()->setTitle( $title );
$partial = new PageTitle( new SkinCitizen() );
$data = sprintf(
'%s
',
'Foo Title (paren)'
);
$text = $partial->decorateTitle( $data );
$this->assertStringContainsString( 'mw-page-title-parenthesis', $text );
}
}