Merge "Use ParserOutput::setUnsortedPageProperty()"

This commit is contained in:
jenkins-bot 2024-04-18 12:47:56 +00:00 committed by Gerrit Code Review
commit 583eeafd37
2 changed files with 3 additions and 3 deletions

View file

@ -126,7 +126,7 @@ class Cite {
// Tag every page where Book Referencing has been used, whether or not the ref tag is valid.
// This code and the page property will be removed once the feature is stable. See T237531.
if ( array_key_exists( self::BOOK_REF_ATTRIBUTE, $argv ) ) {
$parser->getOutput()->setPageProperty( self::BOOK_REF_PROPERTY, '' );
$parser->getOutput()->setUnsortedPageProperty( self::BOOK_REF_PROPERTY );
}
$status = $this->parseArguments(

View file

@ -415,8 +415,8 @@ class CiteTest extends \MediaWikiIntegrationTestCase {
$mockOutput = $this->createMock( ParserOutput::class );
// This will be our most important assertion.
$mockOutput->expects( $this->once() )
->method( 'setPageProperty' )
->with( Cite::BOOK_REF_PROPERTY, '' );
->method( 'setUnsortedPageProperty' )
->with( Cite::BOOK_REF_PROPERTY );
$mockParser = $this->createNoOpMock( Parser::class, [ 'getOutput' ] );
$mockParser->method( 'getOutput' )->willReturn( $mockOutput );