function EntityTranslationTest::testLanguageFallback

Same name in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php \Drupal\KernelTests\Core\Entity\EntityTranslationTest::testLanguageFallback()
  2. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php \Drupal\KernelTests\Core\Entity\EntityTranslationTest::testLanguageFallback()
  3. 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php \Drupal\KernelTests\Core\Entity\EntityTranslationTest::testLanguageFallback()

Tests language fallback applied to field and entity translations.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityTranslationTest.php, line 577

Class

EntityTranslationTest
Tests entity translation functionality.

Namespace

Drupal\KernelTests\Core\Entity

Code

public function testLanguageFallback() : void {
    // Test all entity variations with data table support.
    foreach (entity_test_entity_types(ENTITY_TEST_TYPES_MULTILINGUAL) as $entity_type) {
        $this->doTestLanguageFallback($entity_type);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.