mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-23 22:03:39 +00:00
feat: additional test coverage for Minerva 'TOOLBOX'
Bug: T66315 Change-Id: I03cb66a55fddcbae31e6f59f268ccfa7a31318ef
This commit is contained in:
parent
52a6a1a147
commit
92a0197c9f
|
@ -112,6 +112,18 @@ class SkinMinervaTest extends MediaWikiIntegrationTestCase {
|
|||
]
|
||||
]
|
||||
], true ];
|
||||
yield "wikibase item exists in both toolbar and in other projects" => [ [
|
||||
'TOOLBOX' => [
|
||||
'wikibase' => [
|
||||
'id' => 't-wikibase',
|
||||
],
|
||||
],
|
||||
'wikibase-otherprojects' => [
|
||||
[
|
||||
'id' => 't-wikibase',
|
||||
]
|
||||
]
|
||||
], true ];
|
||||
yield "no wikibase item connected" => [ [
|
||||
'TOOLBOX' => [
|
||||
],
|
||||
|
@ -129,8 +141,10 @@ class SkinMinervaTest extends MediaWikiIntegrationTestCase {
|
|||
$sidebar = SkinMinerva::moveWikibaseLinkToToolbox( $sidebar );
|
||||
if ( $linkExists ) {
|
||||
$this->assertArrayHasKey( 'wikibase', $sidebar['TOOLBOX'] );
|
||||
$this->assertEquals( 'wikibase', array_key_last( $sidebar['TOOLBOX'] ) );
|
||||
} else {
|
||||
$this->assertArrayNotHasKey( 'wikibase', $sidebar['TOOLBOX'] ?? [] );
|
||||
$this->assertNotEquals( 'wikibase', array_key_last( $sidebar['TOOLBOX'] ?? [] ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue