protected function EntityTranslationTestBase::enableTranslation

Enables translation for the current entity type and bundle.

2 calls to EntityTranslationTestBase::enableTranslation()
ConfigTestTranslationUITest::enableTranslation in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/ConfigTestTranslationUITest.php
Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::enableTranslation().
EntityTranslationTestBase::setUp in drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php
Sets up a Drupal site for running functional and integration tests.
1 method overrides EntityTranslationTestBase::enableTranslation()

File

drupal/core/modules/translation_entity/lib/Drupal/translation_entity/Tests/EntityTranslationTestBase.php, line 149
Contains \Drupal\entity\Tests\EntityTranslationTestBase.

Class

EntityTranslationTestBase
Tests entity translation workflows.

Namespace

Drupal\translation_entity\Tests

Code

protected function enableTranslation() {

  // Enable translation for the current entity type and ensure the change is
  // picked up.
  translation_entity_set_config($this->entityType, $this->bundle, 'enabled', TRUE);
  drupal_static_reset();
  entity_info_cache_clear();
  menu_router_rebuild();
}