Page MenuHomeWickedGov Phorge

ChoiceDataProviderTest.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ChoiceDataProviderTest.php

<?php
/**
* @group CentralNotice
* @group medium
* @group Database
* @covers \ChoiceDataProvider
*/
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
*/
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 15 2026, 05:30 (13 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ee/10/1cbe30a3a96badce0552934020d4
Default Alt Text
ChoiceDataProviderTest.php (1 KB)

Event Timeline