mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-12-01 09:06:30 +00:00
1bd1b64298
Change-Id: Ie8958e3a2d12f22b290ecc27bf078bb053f4c82f
29 lines
778 B
PHP
29 lines
778 B
PHP
<?php
|
|
|
|
use MediaWiki\Auth\AuthenticationRequestTestCase;
|
|
use MediaWiki\Auth\AuthManager;
|
|
|
|
/**
|
|
* @covers TitleBlacklistAuthenticationRequest
|
|
*/
|
|
class TitleBlacklistAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
|
public function setUp() {
|
|
global $wgDisableAuthManager;
|
|
if ( !class_exists( AuthManager::class ) || $wgDisableAuthManager ) {
|
|
$this->markTestSkipped( 'AuthManager is disabled' );
|
|
}
|
|
parent::setUp();
|
|
}
|
|
|
|
protected function getInstance( array $args = [] ) {
|
|
return new TitleBlacklistAuthenticationRequest();
|
|
}
|
|
|
|
public function provideLoadFromSubmission() {
|
|
return [
|
|
'empty' => [ [], [], [ 'ignoreTitleBlacklist' => false ] ],
|
|
'true' => [ [], [ 'ignoreTitleBlacklist' => '1' ], [ 'ignoreTitleBlacklist' => true ] ],
|
|
];
|
|
}
|
|
}
|