Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5975970
ChoiceDataProviderTest.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
ChoiceDataProviderTest.php
View Options
<?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
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 18:44 (1 d, 11 h ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
dd/bd/8c19596b0c3bb65345d2bf566104
Default Alt Text
ChoiceDataProviderTest.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment