Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4141544
CommandLineInstallerTest.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
CommandLineInstallerTest.php
View Options
<?php
namespace
MediaWiki\Tests\Maintenance
;
use
CommandLineInstaller
;
/**
* @covers \CommandLineInstaller
* @author Dreamy Jazz
*/
class
CommandLineInstallerTest
extends
MaintenanceBaseTestCase
{
public
function
getMaintenanceClass
()
{
return
CommandLineInstaller
::
class
;
}
public
function
testExecuteWhenHelpSpecified
()
{
$this
->
maintenance
->
setOption
(
'help'
,
1
);
// ::maybeShowHelp uses ->mName which is null unless we call this.
$this
->
maintenance
->
setName
(
'install.php'
);
$this
->
expectCallToFatalError
();
$this
->
expectOutputString
(
$this
->
maintenance
->
getParameters
()->
getHelp
()
.
"
\n
"
);
$this
->
maintenance
->
execute
();
}
public
function
testExecuteWhenFirstArgumentProvidedButNotSecond
()
{
$this
->
maintenance
->
setArg
(
'name'
,
'mediawiki'
);
// ::maybeShowHelp uses ->mName which is null unless we call this.
$this
->
maintenance
->
setName
(
'install.php'
);
$this
->
expectCallToFatalError
();
$this
->
expectOutputRegex
(
'/Argument
\<
admin
\>
is required/'
);
$this
->
maintenance
->
execute
();
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 15:59 (3 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9b/9a/3ced791a54c50dbca6268a70dfdb
Default Alt Text
CommandLineInstallerTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment