jenkins-bot has submitted this change and it was merged. (
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 necessary 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, 3 insertions(+), 4 deletions(-)
Approvals:
Lucas Werkmeister (WMDE): Looks good to me, approved
jenkins-bot: Verified
diff --git a/api/RunCrossCheck.php b/api/RunCrossCheck.php
index 43ddd33..54bd122 100644
--- a/api/RunCrossCheck.php
+++ b/api/RunCrossCheck.php
@@ -136,8 +136,8 @@
$this->assertAreValidClaimGuids( $guids );
$resultLists =
$this->crossCheckInteractor->crossCheckStatementsByGuids( $guids );
} else {
- $this->errorReporter->dieError(
- 'Either provide the ids of entities or ids of
claims, that should be cross-checked.',
+ $this->errorReporter->dieWithError(
+ [ 'wikibase-api-param-missing',
'entities|claims' ],
'param-missing'
);
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: merged
Gerrit-Change-Id: I61b6645994305ed4f94ff44345ddc12d3b1b0285
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/WikibaseQualityExternalValidation
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: Ladsgroup <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits