2016-05-07 11:21:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use MediaWiki\Auth\AuthenticationRequestTestCase;
|
|
|
|
use MediaWiki\Auth\AuthManager;
|
|
|
|
|
|
|
|
class TitleBlacklistAuthenticationRequestTest extends AuthenticationRequestTestCase {
|
|
|
|
public function setUp() {
|
|
|
|
global $wgDisableAuthManager;
|
|
|
|
if ( !class_exists( AuthManager::class ) || $wgDisableAuthManager ) {
|
|
|
|
$this->markTestSkipped( 'AuthManager is disabled' );
|
|
|
|
}
|
|
|
|
parent::setUp();
|
|
|
|
}
|
|
|
|
|
2017-06-06 16:18:36 +00:00
|
|
|
protected function getInstance( array $args = [] ) {
|
2016-05-07 11:21:02 +00:00
|
|
|
return new TitleBlacklistAuthenticationRequest();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function provideLoadFromSubmission() {
|
|
|
|
return [
|
|
|
|
'empty' => [ [], [], [ 'ignoreTitleBlacklist' => false ] ],
|
|
|
|
'true' => [ [], [ 'ignoreTitleBlacklist' => '1' ], [ 'ignoreTitleBlacklist' => true ] ],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|