Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F7453819
GetReplicaServerTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
740 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
Sun, Nov 22, 22:56 (2 d, 8 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
d7/2a/d9d26f2c1a5f57e28c38531e9b1f
Default Alt Text
GetReplicaServerTest.php (740 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment