Page MenuHomeWickedGov Phorge

ChoiceDataProviderTest.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ChoiceDataProviderTest.php

<?php
/**
* @group CentralNotice
* @group medium
* @group Database
*/
class ChoiceDataProviderTest extends MediaWikiIntegrationTestCase {
/** @var CentralNoticeTestFixtures */
private $cnFixtures;
protected function setUp(): void {
parent::setUp();
$this->cnFixtures = new CentralNoticeTestFixtures( $this->getTestSysop()->getUser() );
}
protected function tearDown(): void {
$this->cnFixtures->tearDownTestCases();
parent::tearDown();
}
/**
* @dataProvider CentralNoticeTestFixtures::allocationsTestCasesProvision
* @covers ChoiceDataProvider::getChoices
*/
public function testProviderResponse( $name, $testCase ) {
$this->cnFixtures->setupTestCaseFromFixtureData( $testCase );
foreach ( $testCase['contexts_and_outputs'] as $cANdOName => $contextAndOutput ) {
$choices = ChoiceDataProvider::getChoices(
$contextAndOutput['context']['project'],
$contextAndOutput['context']['language']
);
$this->cnFixtures->assertChoicesEqual(
$this, $contextAndOutput['choices'], $choices, $cANdOName );
}
}
}

File Metadata

Mime Type
text/x-php
Expires
Aug 19 2026, 19:00 (6 w, 4 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
dd/bd/8c19596b0c3bb65345d2bf566104
Default Alt Text
ChoiceDataProviderTest.php (1 KB)

Event Timeline