Tests: Limit testGetTemplateData to current values to allow expansion

In I0cd49e6d621cd437e440ac7f7627eaa064ab870c a new field will be
added. Our tests in Vector shouldn't fail every time this happens

Change-Id: Ieb4923e9f58f950ee02ce3eb1446b982d1f5724a
This commit is contained in:
Jon Robson 2022-01-28 15:59:19 -08:00
parent 588d273360
commit c87f6a8b2e
1 changed files with 12 additions and 0 deletions

View File

@ -86,6 +86,18 @@ class SkinVectorTest extends MediaWikiIntegrationTestCase {
$views = $props['data-views'];
$namespaces = $props['data-namespaces'];
// The mediawiki core specification might change at any time
// so let's limit the values we test to those we are aware of.
$keysToTest = [
'id', 'class', 'html-tooltip', 'html-items',
'html-after-portal', 'html-before-portal',
'label', 'heading-class', 'is-dropdown'
];
foreach ( $views as $key => $value ) {
if ( !in_array( $key, $keysToTest ) ) {
unset( $views[ $key] );
}
}
$this->assertSame(
[
// Provided by core