Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4089664
GetReplicaServerTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
739 B
Referenced Files
None
Subscribers
None
GetReplicaServerTest.php
View Options
<?php
namespace
MediaWiki\Tests\Maintenance
;
use
GetReplicaServer
;
/**
* @covers GetReplicaServer
* @group Database
* @author Dreamy Jazz
*/
class
GetReplicaServerTest
extends
MaintenanceBaseTestCase
{
protected
function
getMaintenanceClass
()
{
return
GetReplicaServer
::
class
;
}
public
function
testExecuteForUnknownCluster
()
{
$this
->
maintenance
->
setOption
(
'cluster'
,
'invalid-cluster'
);
$this
->
expectCallToFatalError
();
$this
->
expectOutputRegex
(
"/Error: Unknown cluster 'invalid-cluster'/"
);
$this
->
maintenance
->
execute
();
}
public
function
testExecute
()
{
$this
->
maintenance
->
execute
();
$expectedServerName
=
$this
->
getDb
()->
getServerName
();
$this
->
expectOutputString
(
"$expectedServerName
\n
"
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 18 2026, 10:40 (6 w, 1 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
e5/22/d729d466b07fee5345381d4aa65b
Default Alt Text
GetReplicaServerTest.php (739 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment