wiki.techinc.nl/tests/phpunit/includes/api/ApiDisabledTest.php
Reedy 75640200fb tests: Namespace api tests
Bug: T357823
Change-Id: I0d7cc2c9b166d5e5b913c1305f7cee017fe377af
2024-02-18 15:47:04 +00:00

20 lines
374 B
PHP

<?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' ] );
}
}