2019-04-08 17:08:57 +00:00
|
|
|
<?php
|
|
|
|
|
2019-07-01 18:06:01 +00:00
|
|
|
namespace Tests\MediaWiki\Minerva\Menu\Entries;
|
2019-04-08 17:08:57 +00:00
|
|
|
|
2019-07-01 18:06:01 +00:00
|
|
|
use MediaWiki\Minerva\Menu\Entries\MenuEntry;
|
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
|
|
|
*/
|
2021-10-11 22:53:10 +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() );
|
|
|
|
}
|
|
|
|
}
|