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

/**
 * @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' ] );
	}
}