Addshore has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/88019


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/19/88019/1

diff --git a/repo/tests/phpunit/includes/changeop/ChangeOpClaimTest.php 
b/repo/tests/phpunit/includes/changeop/ChangeOpClaimTest.php
index 2572061..4a98a9c 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: newchange
Gerrit-Change-Id: If50f6a078c85df9fe8796574d500e07b9a1413be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to