mediawiki-extensions-TitleB.../tests/phpunit/TitleBlacklistAuthenticationRequestTest.php
Kunal Mehta 1bd1b64298 Add @covers tags
Change-Id: Ie8958e3a2d12f22b290ecc27bf078bb053f4c82f
2018-02-16 00:01:34 -08:00

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 ] ],
];
}
}