mediawiki-extensions-TitleB.../tests/phpunit/TitleBlacklistAuthenticationRequestTest.php
Umherirrender 55d068708a Add phpcs and make pass
Change-Id: If5a2ec9700148eb842d6580945e51e1942a2e0ed
2017-06-06 18:18:36 +02:00

26 lines
723 B
PHP

<?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();
}
protected function getInstance( array $args = [] ) {
return new TitleBlacklistAuthenticationRequest();
}
public function provideLoadFromSubmission() {
return [
'empty' => [ [], [], [ 'ignoreTitleBlacklist' => false ] ],
'true' => [ [], [ 'ignoreTitleBlacklist' => '1' ], [ 'ignoreTitleBlacklist' => true ] ],
];
}
}