Update tests for default Menu template value

Change-Id: I32586a379cbacaad5cfb361facf79c01e982818a
This commit is contained in:
bwang 2021-06-14 13:47:42 -05:00
parent 99a201d5b9
commit 0fc7be61c1
2 changed files with 10 additions and 1 deletions

View file

@ -59,6 +59,7 @@
* @property {string} [class] of menu
* @property {string} [html-user-language-attributes]
* @property {boolean} [is-dropdown]
* @property {string} [html-before-portal] Additional HTML specific to portal menus.
* @property {string} [html-after-portal] Additional HTML specific to portal menus.
*/

View file

@ -80,6 +80,11 @@ class SkinVectorTest extends MediaWikiIntegrationTestCase {
$views = $props['data-views'];
$namespaces = $props['data-namespaces'];
// Can be removed when https://gerrit.wikimedia.org/r/c/mediawiki/core/+/699446 is merged.
if ( !array_key_exists( 'html-before-portal', $views ) ) {
$views = wfArrayInsertAfter( $views, [ 'html-before-portal' => '' ], 'html-after-portal' );
}
$this->assertSame(
[
// Provided by core
@ -88,11 +93,14 @@ class SkinVectorTest extends MediaWikiIntegrationTestCase {
'html-tooltip' => '',
'html-items' => '',
'html-after-portal' => '',
'html-before-portal' => '',
'label' => $context->msg( 'views' )->text(),
'heading-class' => 'vector-menu-heading',
'is-dropdown' => false,
],
$views
$views,
0,
true
);
$variants = $props['data-variants'];