aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiTestCase.php
diff options
context:
space:
mode:
authorBartosz Dziewoński <dziewonski@fastmail.fm>2024-04-08 21:01:35 +0200
committerBartosz Dziewoński <dziewonski@fastmail.fm>2024-05-18 14:45:54 +0000
commitcfcfe299e2657b601a1694b15d4db7d812e6a60c (patch)
tree2a0ba8636608e495e7999827749e7a76be4c0267 /tests/phpunit/includes/api/ApiTestCase.php
parent53491f4f2d85378003ae76297fa3f12859a1dc25 (diff)
downloadmediawikicore-cfcfe299e2657b601a1694b15d4db7d812e6a60c.tar.gz
mediawikicore-cfcfe299e2657b601a1694b15d4db7d812e6a60c.zip
Use StatusValue::getMessages() instead of deprecated methods
This commit replaces some of the uses of getErrorsArray(), getWarningsArray(), getErrorsByType(), and getErrors(). In many cases the code becomes shorter and clearer. Follow-up to Ibc4ce11594cf36ce7b2495d2636ee080d3443b04. Change-Id: Id0ebeac26ae62231edb48458dbd2e13ddcbd0a9e
Diffstat (limited to 'tests/phpunit/includes/api/ApiTestCase.php')
-rw-r--r--tests/phpunit/includes/api/ApiTestCase.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/phpunit/includes/api/ApiTestCase.php b/tests/phpunit/includes/api/ApiTestCase.php
index 6137f438142c..c1a562e01832 100644
--- a/tests/phpunit/includes/api/ApiTestCase.php
+++ b/tests/phpunit/includes/api/ApiTestCase.php
@@ -300,7 +300,7 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
if ( !$other instanceof ApiUsageException ) {
return null;
}
- $errors = $other->getStatusValue()->getErrors();
+ $errors = $other->getStatusValue()->getMessages();
if ( count( $errors ) === 0 ) {
return '(no error)';
} elseif ( count( $errors ) > 1 ) {