Page MenuHomeWickedGov Phorge

CampaignTypeTest.php
No OneTemporary

Size
974 B
Referenced Files
None
Subscribers
None

CampaignTypeTest.php

<?php
/**
* @group Fundraising
* @group CentralNotice
* @covers \CampaignType
*/
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

Mime Type
text/x-php
Expires
Sun, Nov 22, 19:46 (1 d, 12 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9a/d6/a487632540f05ce1f05a44de36a1
Default Alt Text
CampaignTypeTest.php (974 B)

Event Timeline