ParserOutput::getPageProperty() now returns null when key is missing.

The return value of ParserOutput::getPageProperty() has transitioned
to returning `null` instead of `false` when the page property is missing.

Bug: T301915
Depends-On: Iaa25c390118d2db2b6578cdd558f2defd5351d15
Change-Id: Ie746883bd14eb579b40390d5fe824a5c6f93fa1e
This commit is contained in:
C. Scott Ananian 2022-02-16 18:37:34 -05:00
parent e9b268827f
commit 8d62412484

View file

@ -186,14 +186,12 @@ class ParserFileProcessingHookHandlersTest extends MediaWikiIntegrationTestCase
$handler = $this->getHandler( $candidates );
$handler->doParserAfterTidy( $parser, $html );
if ( $leadOnly ) {
$this->assertFalse(
// T301915
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ) ?? false,
$this->assertNull(
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ),
'Only lead images are returned.' );
} else {
$this->assertIsString(
// T301915
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ) ?? false,
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ),
'All images are returned'
);