You are here

protected function LingotekContentTypeExistingBulkTranslationTest::setUp in Lingotek Translation 3.7.x

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

Overrides LingotekTestBase::setUp

File

tests/src/Functional/LingotekContentTypeExistingBulkTranslationTest.php, line 21

Class

LingotekContentTypeExistingBulkTranslationTest
Tests translating a config entity using the bulk management form.

Namespace

Drupal\Tests\lingotek\Functional

Code

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

  // Create Article node types.
  $this
    ->drupalCreateContentType([
    'type' => 'article',
    'name' => 'Article',
  ]);

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

  // Create a translation for the config entity.
  $config = \Drupal::languageManager()
    ->getLanguageConfigOverride('es', 'node.type.article');
  $config
    ->set('name', 'Translated Article')
    ->save();
  $this
    ->saveLingotekConfigTranslationSettings([
    'node_type' => 'automatic',
  ]);
}