2019-04-08 17:08:57 +00:00
|
|
|
<?php
|
|
|
|
|
2022-05-03 18:11:54 +00:00
|
|
|
namespace MediaWiki\Minerva\Menu\Entries;
|
2019-04-08 17:08:57 +00:00
|
|
|
|
2022-05-03 18:11:54 +00:00
|
|
|
use MediaWikiIntegrationTestCase;
|
2019-04-08 17:08:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @group MinervaNeue
|
2019-07-01 18:06:01 +00:00
|
|
|
* @coversDefaultClass \MediaWiki\Minerva\Menu\Entries\MenuEntry
|
2019-04-08 17:08:57 +00:00
|
|
|
*/
|
2022-05-03 18:11:54 +00:00
|
|
|
class MenuEntryTest extends MediaWikiIntegrationTestCase {
|
2019-04-08 17:08:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @covers ::__construct
|
|
|
|
* @covers ::getName()
|
2019-05-14 10:31:54 +00:00
|
|
|
* @covers ::getCSSClasses()
|
2019-04-08 17:08:57 +00:00
|
|
|
* @covers ::getComponents()
|
|
|
|
*/
|
|
|
|
public function testMenuEntryConstruction() {
|
|
|
|
$name = 'test';
|
|
|
|
$isJSOnly = true;
|
|
|
|
$entry = new MenuEntry( $name, $isJSOnly );
|
|
|
|
$this->assertSame( $name, $entry->getName() );
|
2019-05-14 10:31:54 +00:00
|
|
|
$this->assertArrayEquals( [ 'jsonly' ], $entry->getCSSClasses() );
|
2019-04-08 17:08:57 +00:00
|
|
|
$this->assertSame( [], $entry->getComponents() );
|
|
|
|
}
|
|
|
|
}
|