mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TemplateData
synced 2024-11-12 01:09:40 +00:00
Simplify test data providers with yield
Change-Id: I6315ad66bcfa9437e1473d59776404c280b8ce4f
This commit is contained in:
parent
10f2f21e86
commit
b522972cac
|
@ -693,11 +693,9 @@ class TemplateDataBlobTest extends MediaWikiIntegrationTestCase {
|
|||
],
|
||||
];
|
||||
|
||||
$calls = [];
|
||||
foreach ( $cases as $case ) {
|
||||
$calls[] = [ $case ];
|
||||
yield [ $case ];
|
||||
}
|
||||
return $calls;
|
||||
}
|
||||
|
||||
private function getStatusText( Status $status ): string {
|
||||
|
@ -1132,11 +1130,10 @@ class TemplateDataBlobTest extends MediaWikiIntegrationTestCase {
|
|||
'msg' => 'Set label is not optional, choose first available key as final fallback'
|
||||
],
|
||||
];
|
||||
$calls = [];
|
||||
|
||||
foreach ( $cases as $case ) {
|
||||
$calls[] = [ $case ];
|
||||
yield [ $case ];
|
||||
}
|
||||
return $calls;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1348,11 +1345,10 @@ class TemplateDataBlobTest extends MediaWikiIntegrationTestCase {
|
|||
'msg' => 'Duplicate params in paramOrder'
|
||||
],
|
||||
];
|
||||
$calls = [];
|
||||
|
||||
foreach ( $cases as $case ) {
|
||||
$calls[] = [ $case ];
|
||||
yield [ $case ];
|
||||
}
|
||||
return $calls;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue