You are here

protected function DomainAccessLanguageSaveTest::setUp in Domain Access 8

Overrides DomainTestBase::setUp

File

domain_access/tests/src/Functional/DomainAccessLanguageSaveTest.php, line 33

Class

DomainAccessLanguageSaveTest
Tests saving the domain access field elements in multiple languages.

Namespace

Drupal\Tests\domain_access\Functional

Code

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

  // Create 5 domains.
  $this
    ->domainCreateTestDomains(5);

  // Add Hungarian and Afrikaans.
  ConfigurableLanguage::createFromLangcode('hu')
    ->save();
  ConfigurableLanguage::createFromLangcode('af')
    ->save();

  // Enable content translation for the current entity type.
  \Drupal::service('content_translation.manager')
    ->setEnabled('node', 'page', TRUE);
}