Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7398592
CentralAuthHooksUsingDatabaseTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
CentralAuthHooksUsingDatabaseTest.php
View Options
<?php
namespace
MediaWiki\Extension\CentralAuth\Tests\Phpunit\Integration
;
use
CentralAuthTestUser
;
use
MediaWiki\Extension\CentralAuth\User\CentralAuthUser
;
use
MediaWikiIntegrationTestCase
;
/**
* Basic tests for CentralAuthHooks
*
* @group CentralAuthDB
* @group Database
* @covers \MediaWiki\Extension\CentralAuth\CentralAuthHooks
*/
class
CentralAuthHooksUsingDatabaseTest
extends
MediaWikiIntegrationTestCase
{
public
function
testLockedEmailDisabled
()
{
$u
=
new
CentralAuthTestUser
(
'GlobalLockedUser'
,
'GLUP@ssword'
,
[
'gu_id'
=>
'1003'
,
'gu_locked'
=>
1
,
'gu_hidden_level'
=>
CentralAuthUser
::
HIDDEN_LEVEL_NONE
,
'gu_email'
=>
'testlocked@localhost'
,
'gu_home_db'
=>
'metawiki'
,
],
[
[
'metawiki'
,
'primary'
],
]
);
$u
->
save
(
$this
->
getDb
()
);
$userFactory
=
$this
->
getServiceContainer
()->
getUserFactory
();
$user
=
$userFactory
->
newFromName
(
'GlobalLockedUser'
);
$this
->
assertFalse
(
$user
->
isEmailConfirmed
()
);
$this
->
assertFalse
(
$user
->
canReceiveEmail
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Nov 21, 15:24 (3 h, 11 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
6c/b6/4479842614a8af0eb1c092208f90
Default Alt Text
CentralAuthHooksUsingDatabaseTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment