Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4144397
ApiQueryDisabledTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
766 B
Referenced Files
None
Subscribers
None
ApiQueryDisabledTest.php
View Options
<?php
namespace
MediaWiki\Tests\Api\Query
;
use
MediaWiki\Tests\Api\ApiTestCase
;
/**
* @group API
* @group medium
*
* @covers MediaWiki\Api\ApiQueryDisabled
*/
class
ApiQueryDisabledTest
extends
ApiTestCase
{
public
function
testDisabled
()
{
$this
->
mergeMwGlobalArrayValue
(
'wgAPIPropModules'
,
[
'categories'
=>
'ApiQueryDisabled'
]
);
$data
=
$this
->
doApiRequest
(
[
'action'
=>
'query'
,
'prop'
=>
'categories'
,
]
);
$this
->
assertArrayHasKey
(
'warnings'
,
$data
[
0
]
);
$this
->
assertArrayHasKey
(
'categories'
,
$data
[
0
][
'warnings'
]
);
$this
->
assertArrayHasKey
(
'warnings'
,
$data
[
0
][
'warnings'
][
'categories'
]
);
$this
->
assertEquals
(
'The "categories" module has been disabled.'
,
$data
[
0
][
'warnings'
][
'categories'
][
'warnings'
]
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 17:12 (4 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
4a/7e/ec3324936320df31258d26efee2b
Default Alt Text
ApiQueryDisabledTest.php (766 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment