aboutsummaryrefslogtreecommitdiffstats
path: root/tests/phpunit/includes/api/ApiDisabledTest.php
blob: 06a3f179a4afd1452536d8435cd311e4faf6c163 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<?php

namespace MediaWiki\Tests\Api;

/**
 * @group API
 * @group medium
 *
 * @covers \ApiDisabled
 */
class ApiDisabledTest extends ApiTestCase {
	public function testDisabled() {
		$this->mergeMwGlobalArrayValue( 'wgAPIModules',
			[ 'login' => 'ApiDisabled' ] );

		$this->expectApiErrorCode( 'moduledisabled' );

		$this->doApiRequest( [ 'action' => 'login' ] );
	}
}