Simplify test data providers with yield

Change-Id: I6315ad66bcfa9437e1473d59776404c280b8ce4f
This commit is contained in:
thiemowmde 2023-08-23 09:18:16 +02:00
parent 10f2f21e86
commit b522972cac

View file

@ -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;
}
/**