mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/PageImages
synced 2024-11-28 02:00:42 +00:00
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:
parent
e9b268827f
commit
8d62412484
|
@ -186,14 +186,12 @@ class ParserFileProcessingHookHandlersTest extends MediaWikiIntegrationTestCase
|
||||||
$handler = $this->getHandler( $candidates );
|
$handler = $this->getHandler( $candidates );
|
||||||
$handler->doParserAfterTidy( $parser, $html );
|
$handler->doParserAfterTidy( $parser, $html );
|
||||||
if ( $leadOnly ) {
|
if ( $leadOnly ) {
|
||||||
$this->assertFalse(
|
$this->assertNull(
|
||||||
// T301915
|
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ),
|
||||||
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ) ?? false,
|
|
||||||
'Only lead images are returned.' );
|
'Only lead images are returned.' );
|
||||||
} else {
|
} else {
|
||||||
$this->assertIsString(
|
$this->assertIsString(
|
||||||
// T301915
|
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ),
|
||||||
$parser->getOutput()->getPageProperty( PageImages::PROP_NAME_FREE ) ?? false,
|
|
||||||
'All images are returned'
|
'All images are returned'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue