Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/369393 )

Change subject: Fix broken test due to changed API error reporting
......................................................................

Fix broken test due to changed API error reporting

This change is necesarry because we made this message localizable.

I'm going for a hack here (squishing two parameter names into one
message parameter) because this code is not deployed anyway. I just
want to fix the broken CI, ok?

Change-Id: I61b6645994305ed4f94ff44345ddc12d3b1b0285
---
M api/RunCrossCheck.php
M tests/phpunit/Api/RunCrossCheckTest.php
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseQualityExternalValidation
 refs/changes/93/369393/1

diff --git a/api/RunCrossCheck.php b/api/RunCrossCheck.php
index 43ddd33..dd5eeef 100644
--- a/api/RunCrossCheck.php
+++ b/api/RunCrossCheck.php
@@ -138,7 +138,9 @@
                } else {
                        $this->errorReporter->dieError(
                                'Either provide the ids of entities or ids of 
claims, that should be cross-checked.',
-                               'param-missing'
+                               'param-missing',
+                               0,
+                               [ 'entities|claims' ]
                        );
                        throw new LogicException();
                }
diff --git a/tests/phpunit/Api/RunCrossCheckTest.php 
b/tests/phpunit/Api/RunCrossCheckTest.php
index 06e996c..9874d46 100644
--- a/tests/phpunit/Api/RunCrossCheckTest.php
+++ b/tests/phpunit/Api/RunCrossCheckTest.php
@@ -203,8 +203,7 @@
 
                $this->setExpectedException(
                        ApiUsageException::class,
-                       'A parameter that is required was missing. (Either 
provide the ids of entities or '
-                               . 'ids of claims, that should be 
cross-checked.)'
+                       'The required parameter "entities|claims" was missing.'
                );
 
                $this->doApiRequest( $params );

-- 
To view, visit https://gerrit.wikimedia.org/r/369393
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61b6645994305ed4f94ff44345ddc12d3b1b0285
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>

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

Reply via email to