function MenuLinkContentTranslationUITest::testTranslationLinkTheme
Same name in other branches
- 8.9.x core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php \Drupal\Tests\menu_link_content\Functional\MenuLinkContentTranslationUITest::testTranslationLinkTheme()
- 10 core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php \Drupal\Tests\menu_link_content\Functional\MenuLinkContentTranslationUITest::testTranslationLinkTheme()
- 11.x core/modules/menu_link_content/tests/src/Functional/MenuLinkContentTranslationUITest.php \Drupal\Tests\menu_link_content\Functional\MenuLinkContentTranslationUITest::testTranslationLinkTheme()
Tests that translation page inherits admin status of edit page.
File
-
core/
modules/ menu_link_content/ tests/ src/ Functional/ MenuLinkContentTranslationUITest.php, line 91
Class
- MenuLinkContentTranslationUITest
- Tests the menu link content translation UI.
Namespace
Drupal\Tests\menu_link_content\FunctionalCode
public function testTranslationLinkTheme() {
$this->drupalLogin($this->administrator);
$entityId = $this->createEntity([], 'en');
// Set up the default admin theme to test.
$this->container
->get('theme_installer')
->install([
'claro',
]);
$edit = [];
$edit['admin_theme'] = 'claro';
$this->drupalGet('admin/appearance');
$this->submitForm($edit, 'Save configuration');
// Check that edit uses the admin theme.
$this->drupalGet('admin/structure/menu/item/' . $entityId . '/edit');
$this->assertSession()
->responseContains('core/themes/claro/css/base/elements.css');
// Check that translation uses admin theme as well.
$this->drupalGet('admin/structure/menu/item/' . $entityId . '/edit/translations');
$this->assertSession()
->responseContains('core/themes/claro/css/base/elements.css');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.