mediawiki-skins-MinervaNeue/tests/phpunit/menu/Entries/MenuEntryTest.php

28 lines
666 B
PHP
Raw Normal View History

<?php
namespace MediaWiki\Minerva\Menu\Entries;
use MediaWikiIntegrationTestCase;
/**
* @group MinervaNeue
* @coversDefaultClass \MediaWiki\Minerva\Menu\Entries\MenuEntry
*/
class MenuEntryTest extends MediaWikiIntegrationTestCase {
/**
* @covers ::__construct
* @covers ::getName()
* @covers ::getCSSClasses()
* @covers ::getComponents()
*/
public function testMenuEntryConstruction() {
$name = 'test';
$isJSOnly = true;
$entry = new MenuEntry( $name, $isJSOnly );
$this->assertSame( $name, $entry->getName() );
$this->assertArrayEquals( [ 'jsonly' ], $entry->getCSSClasses() );
$this->assertSame( [], $entry->getComponents() );
}
}