MediaWiki
REL1_31
ApiDisabledTest.php
Go to the documentation of this file.
1
<?php
2
9
class
ApiDisabledTest
extends
ApiTestCase
{
10
public
function
testDisabled
() {
11
$this->
mergeMwGlobalArrayValue
(
'wgAPIModules'
,
12
[
'login'
=>
'ApiDisabled'
] );
13
14
$this->setExpectedException( ApiUsageException::class,
15
'The "login" module has been disabled.'
);
16
17
$this->
doApiRequest
( [
'action'
=>
'login'
] );
18
}
19
}
ApiDisabledTest
API medium.
Definition
ApiDisabledTest.php:9
ApiDisabledTest\testDisabled
testDisabled()
Definition
ApiDisabledTest.php:10
ApiTestCase
Definition
ApiTestCase.php:5
ApiTestCase\doApiRequest
doApiRequest(array $params, array $session=null, $appendModule=false, User $user=null, $tokenType=null)
Does the API request and returns the result.
Definition
ApiTestCase.php:100
MediaWikiTestCase\mergeMwGlobalArrayValue
mergeMwGlobalArrayValue( $name, $values)
Merges the given values into a MW global array variable.
Definition
MediaWikiTestCase.php:813
tests
phpunit
includes
api
ApiDisabledTest.php
Generated on Mon Nov 25 2024 15:36:13 for MediaWiki by
1.10.0