MenuMultilingualMenuBlockTest.php in Menu Multilingual 8
File
tests/src/Functional/MenuMultilingualMenuBlockTest.php
View source
<?php
namespace Drupal\Tests\menu_multilingual\Functional;
class MenuMultilingualMenuBlockTest extends MenuMultilingualTest {
public $menuBlockConfigPath = 'admin/structure/block/manage/mainnavigation';
protected static $modules = [
'menu_block',
];
protected function setUp() : void {
parent::setUp();
$this
->drupalGet('admin/structure/block/manage/stark_main_menu/delete');
$this
->submitForm([], 'Remove');
$this
->drupalGet('admin/structure/block/add/menu_block:main/stark');
$this
->submitForm([
'id' => 'mainnavigation',
'settings[label]' => 'Main navigation',
'settings[label_display]' => FALSE,
'settings[level]' => 1,
'settings[depth]' => 0,
'settings[expand_all_items]' => 1,
'settings[suggestion]' => 'main',
'settings[only_translated_labels]' => FALSE,
'settings[only_translated_content]' => FALSE,
'region' => 'primary_menu',
], 'Save block');
$this
->assertSession()
->statusCodeEquals(200);
}
public function testMenuMultilingualFormDisplay() {
parent::testMenuMultilingualFormDisplay();
$this
->assertSession()
->pageTextContains("Advanced options");
$this
->assertSession()
->pageTextContains("HTML and style options");
}
}