aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiMainTest.php
diff options
context:
space:
mode:
authorJames D. Forrester <jforrester@wikimedia.org>2025-03-19 15:43:54 -0400
committerJames D. Forrester <jforrester@wikimedia.org>2025-03-25 08:54:12 -0400
commit361a7dec6e4c49027888ce16ebaf40b5cfc75b29 (patch)
treea44d8d10ae268f0908feee467c22c9bf6c1a5936 /tests/phpunit/includes/api/ApiMainTest.php
parent3b74a1c5df40e1c24f7abea4eb0b221c69af32da (diff)
downloadmediawikicore-361a7dec6e4c49027888ce16ebaf40b5cfc75b29.tar.gz
mediawikicore-361a7dec6e4c49027888ce16ebaf40b5cfc75b29.zip
Namespace all remaining files in includes/exception
In MediaWiki/Exception, to follow PSR-4 per plural vs. singular (this can be changed later if people really care). Also, move the couple of exceptions in here that were already namespaced in the MW-top-level into the new space. Bug: T353458 Change-Id: I12ed850ae99effb699a6d7ada173f54e72f0570e
Diffstat (limited to 'tests/phpunit/includes/api/ApiMainTest.php')
-rw-r--r--tests/phpunit/includes/api/ApiMainTest.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/phpunit/includes/api/ApiMainTest.php b/tests/phpunit/includes/api/ApiMainTest.php
index bf38a8e0d586..8dc8f31f0029 100644
--- a/tests/phpunit/includes/api/ApiMainTest.php
+++ b/tests/phpunit/includes/api/ApiMainTest.php
@@ -16,6 +16,8 @@ use MediaWiki\Config\Config;
use MediaWiki\Config\HashConfig;
use MediaWiki\Config\MultiConfig;
use MediaWiki\Context\RequestContext;
+use MediaWiki\Exception\MWExceptionHandler;
+use MediaWiki\Exception\ShellDisabledError;
use MediaWiki\Json\FormatJson;
use MediaWiki\Language\RawMessage;
use MediaWiki\MainConfigNames;
@@ -23,11 +25,9 @@ use MediaWiki\Permissions\Authority;
use MediaWiki\Request\FauxRequest;
use MediaWiki\Request\FauxResponse;
use MediaWiki\Request\WebRequest;
-use MediaWiki\ShellDisabledError;
use MediaWiki\StubObject\StubGlobalUser;
use MediaWiki\Tests\Unit\Permissions\MockAuthorityTrait;
use MediaWiki\User\User;
-use MWExceptionHandler;
use StatusValue;
use UnexpectedValueException;
use Wikimedia\Rdbms\DBQueryError;
@@ -1086,7 +1086,7 @@ class ApiMainTest extends ApiTestCase {
],
[
$nsex,
- [ 'existing-error', 'internal_api_error_MediaWiki\ShellDisabledError' ],
+ [ 'existing-error', 'internal_api_error_MediaWiki\Exception\ShellDisabledError' ],
[
'warnings' => [
[ 'code' => 'existing-warning', 'text' => 'existing warning', 'module' => 'main' ],
@@ -1094,7 +1094,7 @@ class ApiMainTest extends ApiTestCase {
'errors' => [
[ 'code' => 'existing-error', 'text' => 'existing error', 'module' => 'main' ],
[
- 'code' => 'internal_api_error_MediaWiki\ShellDisabledError',
+ 'code' => 'internal_api_error_MediaWiki\Exception\ShellDisabledError',
'text' => "[$reqId] Exception caught: " . $nsex->getMessage(),
'data' => [
'errorclass' => ShellDisabledError::class,