jenkins-bot has submitted this change and it was merged.
Change subject: Add extra ChangeOpClaim tests
......................................................................
Add extra ChangeOpClaim tests
This adds checks for adding claims with
the same guids which was technically possible
before the previous commit.
Change-Id: If50f6a078c85df9fe8796574d500e07b9a1413be
---
M repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
1 file changed, 6 insertions(+), 3 deletions(-)
Approvals:
Daniel Kinzler: Looks good to me, approved
jenkins-bot: Verified
diff --git a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
index d7f79c7..9b87503 100644
--- a/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
+++ b/repo/tests/phpunit/includes/ChangeOp/ChangeOpClaimTest.php
@@ -72,15 +72,18 @@
$claims[6666]->setGuid(
'Q666$D8404CDA-25E4-4334-AF13-A3290BC66666' );
$args = array();
- //test adding claims with guids from other items
+ //test adding claims with guids from other items(these
shouldn't be added)
$args[] = array ( $itemEmpty, clone $claims[666] , false );
$args[] = array ( $itemEmpty, clone $claims[777] , false );
$args[] = array ( $item666, clone $claims[777] , false );
$args[] = array ( $item777, clone $claims[666] , false );
- //test adding the same claims with a null guid (one should be
created)
+ //test adding the same claims with a null guid (a guid should
be created)
$args[] = array ( $item777, clone $claims[7770] , array(
$claims[777], $claims[7770] ) );
$args[] = array ( $item666, clone $claims[6660] , array(
$claims[666], $claims[6660] ) );
- //test adding the same claims with a correct guid
+ //test adding the same claims with a correct but different guid
(these should be added)
+ $args[] = array ( $item777, clone $claims[7777] , array(
$claims[777], $claims[7770], $claims[7777]) );
+ $args[] = array ( $item666, clone $claims[6666] , array(
$claims[666], $claims[6660], $claims[6666] ) );
+ //test adding the same claims with and id that already exists
(these shouldn't be added)
$args[] = array ( $item777, clone $claims[7777] , array(
$claims[777], $claims[7770], $claims[7777]) );
$args[] = array ( $item666, clone $claims[6666] , array(
$claims[666], $claims[6660], $claims[6666] ) );
--
To view, visit https://gerrit.wikimedia.org/r/88019
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If50f6a078c85df9fe8796574d500e07b9a1413be
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Daniel Kinzler <[email protected]>
Gerrit-Reviewer: Hoo man <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Tobias Gritschacher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits