MediaWiki REL1_34
TitleBlacklistPreAuthenticationProviderTest.php
Go to the documentation of this file.
1<?php
2
4
9class TitleBlacklistPreAuthenticationProviderTest extends MediaWikiTestCase {
13 public function testGetAuthenticationRequests( $action, $username, $expectedReqs ) {
15 $provider->setManager( AuthManager::singleton() );
16 $reqs = $provider->getAuthenticationRequests( $action, [ 'username' => $username ] );
17 $this->assertEquals( $expectedReqs, $reqs );
18 }
19
21 return [
22 [ AuthManager::ACTION_LOGIN, null, [] ],
23 [ AuthManager::ACTION_CREATE, null, [] ],
24 [ AuthManager::ACTION_CREATE, 'UTSysop', [ new TitleBlacklistAuthenticationRequest() ] ],
25 [ AuthManager::ACTION_CHANGE, null, [] ],
26 [ AuthManager::ACTION_REMOVE, null, [] ],
27 ];
28 }
29}
This serves as the entry point to the authentication system.
An authentication request that allows users with sufficiently high privileges to skip the title black...
@group Database @covers TitleBlacklistPreAuthenticationProvider
testGetAuthenticationRequests( $action, $username, $expectedReqs)
@dataProvider provideGetAuthenticationRequests