Tests should use Universal hook
The existing hook does not allow modification of variants which will soon change. Bug: T287533 Change-Id: I8969296c64875d58e3c7ea95f6b567916f82d8a7
This commit is contained in:
parent
ed493798f9
commit
c000fa9a2a
|
@ -60,7 +60,7 @@ class SkinVectorTest extends MediaWikiIntegrationTestCase {
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
] );
|
] );
|
||||||
$this->setTemporaryHook( 'SkinTemplateNavigation', [
|
$this->setTemporaryHook( 'SkinTemplateNavigation::Universal', [
|
||||||
static function ( &$skinTemplate, &$content_navigation ) {
|
static function ( &$skinTemplate, &$content_navigation ) {
|
||||||
$content_navigation['actions'] = [
|
$content_navigation['actions'] = [
|
||||||
'action-1' => []
|
'action-1' => []
|
||||||
|
@ -69,7 +69,13 @@ class SkinVectorTest extends MediaWikiIntegrationTestCase {
|
||||||
'ns-1' => []
|
'ns-1' => []
|
||||||
];
|
];
|
||||||
$content_navigation['variants'] = [
|
$content_navigation['variants'] = [
|
||||||
'variant-1' => []
|
[
|
||||||
|
'class' => 'selected',
|
||||||
|
'text' => 'Language variant',
|
||||||
|
'href' => '/url/to/variant',
|
||||||
|
'lang' => 'zh-hant',
|
||||||
|
'hreflang' => 'zh-hant',
|
||||||
|
]
|
||||||
];
|
];
|
||||||
$content_navigation['views'] = [];
|
$content_navigation['views'] = [];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue