You are here

public function LingotekNodeTabsThemeTest::testThemeTranslateTab in Lingotek Translation 3.7.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  2. 4.0.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  3. 3.0.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  4. 3.1.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  5. 3.2.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  6. 3.3.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  7. 3.4.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  8. 3.5.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  9. 3.6.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()
  10. 3.8.x tests/src/Functional/LingotekNodeTabsThemeTest.php \Drupal\Tests\lingotek\Functional\LingotekNodeTabsThemeTest::testThemeTranslateTab()

Test the theme used in the translate tab.

File

tests/src/Functional/LingotekNodeTabsThemeTest.php, line 89

Class

LingotekNodeTabsThemeTest
Tests the theme used in the Lingotek tabs for nodes.

Namespace

Drupal\Tests\lingotek\Functional

Code

public function testThemeTranslateTab() {

  // Create a node.
  $edit = [];
  $edit['title[0][value]'] = 'Llamas are cool';
  $edit['body[0][value]'] = 'Llamas are very cool';
  $edit['langcode[0][value]'] = 'en';
  $this
    ->saveAndPublishNodeForm($edit);
  $this
    ->assertText('Current theme: bartik');
  $this
    ->clickLink('Edit');
  $this
    ->assertText('Current theme: seven');
  $this
    ->clickLink('Manage Translations');
  $this
    ->assertText('Current theme: seven');
  $edit = [
    'use_admin_theme' => FALSE,
  ];
  $this
    ->drupalPostForm('admin/appearance', $edit, t('Save configuration'));
  $this
    ->drupalGet('node/1');
  $this
    ->assertText('Current theme: bartik');
  $this
    ->clickLink('Edit');
  $this
    ->assertText('Current theme: bartik');
  $this
    ->clickLink('Manage Translations');
  $this
    ->assertText('Current theme: bartik');
}