Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5979340
CampaignTypeTest.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
CampaignTypeTest.php
View Options
<?php
/**
* @group Fundraising
* @group CentralNotice
* @covers CampaignType::getId
* @covers CampaignType::getOnForAll
* @covers CampaignType::getMessageKey
* @covers CampaignType::getPreferenceKey
*/
class
CampaignTypeTest
extends
MediaWikiUnitTestCase
{
private
CampaignType
$campaignType
;
protected
function
setUp
():
void
{
parent
::
setUp
();
$this
->
campaignType
=
new
CampaignType
(
'testtype'
,
false
);
}
public
function
testGetId
()
{
$id
=
$this
->
campaignType
->
getId
();
$this
->
assertSame
(
'testtype'
,
$id
);
}
public
function
testGetOnForAll
()
{
$onForAll
=
$this
->
campaignType
->
getOnForAll
();
$this
->
assertSame
(
false
,
$onForAll
);
}
public
function
testGetMessageKey
()
{
// Coordinate with CampaignType::MESSAGE_KEY_PREFIX
$this
->
assertSame
(
'centralnotice-campaign-type-testtype'
,
$this
->
campaignType
->
getMessageKey
()
);
}
public
function
testGetPreferenceKey
()
{
// Coordinate with CampaignType::PREFERENCE_KEY_PREFIX
$this
->
assertSame
(
'centralnotice-display-campaign-type-testtype'
,
$this
->
campaignType
->
getPreferenceKey
()
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 20:51 (4 d, 23 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
27/88/5a737668dc573b9743b5ca686813
Default Alt Text
CampaignTypeTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment