jenkins-bot has submitted this change and it was merged.
Change subject: Add missing test case for PageImagesDataUpdater
......................................................................
Add missing test case for PageImagesDataUpdater
When there is a preferred statement somewhere, this should not overrule
normal ranked statements on higher priority properties (see comment by
Lydia).
Change-Id: Id3e5b84fa507bb06e0f6752666fbb284fad03d74
---
M repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
1 file changed, 4 insertions(+), 0 deletions(-)
Approvals:
Hoo man: Looks good to me, approved
jenkins-bot: Verified
diff --git
a/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
b/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
index 3849361..fcadef5 100644
--- a/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
+++ b/repo/tests/phpunit/includes/ParserOutput/PageImagesDataUpdaterTest.php
@@ -131,6 +131,8 @@
'Property not found' => array( $statements, array(
'P9999' ), null ),
'Not a property id' => array( $statements, array( 'Q1'
), null ),
'Invalid id' => array( $statements, array( 'invalid' ),
null ),
+
+ // Configuration
'Ignore misconfiguration' => array( $statements, array(
'P1', 'P2', 'P1' ), '1.jpg' ),
'Ignore keys' => array( $statements, array( 2 => 'P1',
1 => 'P2' ), '1.jpg' ),
@@ -144,8 +146,10 @@
'Increasing order' => array( $statements, array( 'P1',
'P2', 'P3' ), '1.jpg' ),
'Decreasing order' => array( $statements, array( 'P3',
'P2', 'P1' ), '3a.jpg' ),
+ // Ranks
'Skip deprecated' => array( $statements, array( 'P4' ),
'Four_2.jpg' ),
'Prefer preferred' => array( $statements, array( 'P5'
), '5c.jpg' ),
+ 'Rank does not overrule priority' => array(
$statements, array( 'P1', 'P5' ), '1.jpg' ),
);
}
--
To view, visit https://gerrit.wikimedia.org/r/265228
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id3e5b84fa507bb06e0f6752666fbb284fad03d74
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lydia Pintscher <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits