You are here

function MenuLinkContentTranslationUITest::testTranslationLinkTheme in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/menu_link_content/src/Tests/MenuLinkContentTranslationUITest.php \Drupal\menu_link_content\Tests\MenuLinkContentTranslationUITest::testTranslationLinkTheme()

Tests that translation page inherits admin status of edit page.

File

core/modules/menu_link_content/src/Tests/MenuLinkContentTranslationUITest.php, line 87
Contains \Drupal\menu_link_content\Tests\MenuLinkContentTranslationUITest.

Class

MenuLinkContentTranslationUITest
Tests the menu link content translation UI.

Namespace

Drupal\menu_link_content\Tests

Code

function testTranslationLinkTheme() {
  $this
    ->drupalLogin($this->administrator);
  $entityId = $this
    ->createEntity(array(), 'en');

  // Set up Seven as the admin theme to test.
  $this->container
    ->get('theme_handler')
    ->install(array(
    'seven',
  ));
  $edit = array();
  $edit['admin_theme'] = 'seven';
  $this
    ->drupalPostForm('admin/appearance', $edit, t('Save configuration'));
  $this
    ->drupalGet('admin/structure/menu/item/' . $entityId . '/edit');
  $this
    ->assertRaw('core/themes/seven/css/base/elements.css', 'Edit uses admin theme.');
  $this
    ->drupalGet('admin/structure/menu/item/' . $entityId . '/edit/translations');
  $this
    ->assertRaw('core/themes/seven/css/base/elements.css', 'Translation uses admin theme as well.');
}