Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4152930
SpecialContributeTest.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
SpecialContributeTest.php
View Options
<?php
use
MediaWiki\Permissions\UltimateAuthority
;
use
MediaWiki\Specials\SpecialContribute
;
use
MediaWiki\User\User
;
/**
* @author MAbualruz
* @group Database
* @covers \MediaWiki\Specials\SpecialContribute
*/
class
SpecialContributeTest
extends
SpecialPageTestBase
{
/** @var string */
private
$pageName
=
__CLASS__
.
'BlaBlaTest'
;
/** @var User */
private
$admin
;
/** @var SpecialContribute */
private
$specialContribute
;
protected
function
setUp
():
void
{
parent
::
setUp
();
$this
->
admin
=
new
UltimateAuthority
(
$this
->
getTestSysop
()->
getUser
()
);
}
/**
* @covers \MediaWiki\Specials\SpecialContribute::execute
*/
public
function
testExecute
()
{
$this
->
specialContribute
=
new
SpecialContribute
();
[
$html
]
=
$this
->
executeSpecialPage
(
$this
->
admin
->
getUser
()->
getName
(),
null
,
'qqx'
,
$this
->
admin
,
true
);
$this
->
assertStringContainsString
(
'<div class="mw-contribute-wrapper">'
,
$html
);
$this
->
assertStringContainsString
(
'<div class="mw-contribute-card-content">'
,
$html
);
}
public
function
testIsShowable
()
{
$this
->
specialContribute
=
new
SpecialContribute
();
$this
->
executeSpecialPage
(
$this
->
admin
->
getUser
()->
getName
(),
null
,
'qqx'
,
$this
->
admin
,
true
);
$this
->
assertFalse
(
$this
->
specialContribute
->
isShowable
()
);
}
/**
* @inheritDoc
*/
protected
function
newSpecialPage
():
SpecialContribute
{
return
$this
->
specialContribute
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Aug 19 2026, 20:33 (7 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
09/47/effb1cd9aef3c7267ab88c8df942
Default Alt Text
SpecialContributeTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment