Remove hard deprecation of PasswordPolicyChecks::checkPopularPasswordBlacklist
[lhc/web/wiklou.git] / tests / phpunit / includes / api / ApiQueryDisabledTest.php
1 <?php
2
3 /**
4 * @group API
5 * @group medium
6 *
7 * @covers ApiQueryDisabled
8 */
9 class ApiQueryDisabledTest extends ApiTestCase {
10 public function testDisabled() {
11 $this->mergeMwGlobalArrayValue( 'wgAPIPropModules',
12 [ 'categories' => 'ApiQueryDisabled' ] );
13
14 $data = $this->doApiRequest( [
15 'action' => 'query',
16 'prop' => 'categories',
17 ] );
18
19 $this->assertArrayHasKey( 'warnings', $data[0] );
20 $this->assertArrayHasKey( 'categories', $data[0]['warnings'] );
21 $this->assertArrayHasKey( 'warnings', $data[0]['warnings']['categories'] );
22
23 $this->assertEquals( 'The "categories" module has been disabled.',
24 $data[0]['warnings']['categories']['warnings'] );
25 }
26 }