MediaWiki
REL1_34
TitleBlacklistPreAuthenticationProviderTest.php
Go to the documentation of this file.
1
<?php
2
3
use
MediaWiki\Auth\AuthManager
;
4
9
class
TitleBlacklistPreAuthenticationProviderTest
extends
MediaWikiTestCase {
13
public
function
testGetAuthenticationRequests
( $action, $username, $expectedReqs ) {
14
$provider =
new
TitleBlacklistPreAuthenticationProvider
();
15
$provider->setManager( AuthManager::singleton() );
16
$reqs = $provider->getAuthenticationRequests( $action, [
'username'
=> $username ] );
17
$this->assertEquals( $expectedReqs, $reqs );
18
}
19
20
public
function
provideGetAuthenticationRequests
() {
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
}
MediaWiki\Auth\AuthManager
This serves as the entry point to the authentication system.
Definition
AuthManager.php:85
TitleBlacklistAuthenticationRequest
An authentication request that allows users with sufficiently high privileges to skip the title black...
Definition
TitleBlacklistAuthenticationRequest.php:9
TitleBlacklistPreAuthenticationProviderTest
@group Database @covers TitleBlacklistPreAuthenticationProvider
Definition
TitleBlacklistPreAuthenticationProviderTest.php:9
TitleBlacklistPreAuthenticationProviderTest\provideGetAuthenticationRequests
provideGetAuthenticationRequests()
Definition
TitleBlacklistPreAuthenticationProviderTest.php:20
TitleBlacklistPreAuthenticationProviderTest\testGetAuthenticationRequests
testGetAuthenticationRequests( $action, $username, $expectedReqs)
@dataProvider provideGetAuthenticationRequests
Definition
TitleBlacklistPreAuthenticationProviderTest.php:13
TitleBlacklistPreAuthenticationProvider
Definition
TitleBlacklistPreAuthenticationProvider.php:7
extensions
TitleBlacklist
tests
phpunit
TitleBlacklistPreAuthenticationProviderTest.php
Generated on Mon Nov 25 2024 16:04:46 for MediaWiki by
1.10.0