You are here

protected function LingotekSystemSiteExistingBulkTranslationTest::setUp in Lingotek Translation 8.2

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

Throws

\Exception

Overrides LingotekTestBase::setUp

File

tests/src/Functional/LingotekSystemSiteExistingBulkTranslationTest.php, line 24

Class

LingotekSystemSiteExistingBulkTranslationTest
Tests translating a config object using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function setUp() {
  parent::setUp();

  // Login as admin.
  $this
    ->drupalLogin($this->rootUser);

  // Add a language.
  $language = ConfigurableLanguage::createFromLangcode('es')
    ->setThirdPartySetting('lingotek', 'locale', 'es_MX');
  $language
    ->save();

  // This is a hack for avoiding writing different lingotek endpoint mocks.
  \Drupal::state()
    ->set('lingotek.uploaded_content_type', 'system.site');

  // Create a translation for system.site object.
  $config = \Drupal::languageManager()
    ->getLanguageConfigOverride('es', 'system.site');
  $config
    ->set('name', 'Translated Site Name')
    ->save();
}