You are here

public function ContentTranslationFieldSyncRevisionTest::testChangeDefaultLanguageNonTranslatableFieldsHidden in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationFieldSyncRevisionTest::testChangeDefaultLanguageNonTranslatableFieldsHidden()

Tests changing the default language of an entity.

File

core/modules/content_translation/tests/src/Kernel/ContentTranslationFieldSyncRevisionTest.php, line 379

Class

ContentTranslationFieldSyncRevisionTest
Tests the field synchronization logic when revisions are involved.

Namespace

Drupal\Tests\content_translation\Kernel

Code

public function testChangeDefaultLanguageNonTranslatableFieldsHidden() {
  $this
    ->setUntranslatableFieldWidgetsDisplay(FALSE);
  $entity = $this
    ->saveNewEntity();
  $entity->langcode = 'it';
  $this
    ->assertCount(0, $entity
    ->validate());
}