You are here

public function ContentTranslationEntityBundleInfoTest::testFieldSynchronizationWithDisabledBundle in Drupal 10

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

Tests that field synchronization is skipped for disabled bundles.

File

core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php, line 89

Class

ContentTranslationEntityBundleInfoTest
Tests the Content Translation bundle info logic.

Namespace

Drupal\Tests\content_translation\Kernel

Code

public function testFieldSynchronizationWithDisabledBundle() {
  $entity = EntityTestMul::create();
  $entity
    ->save();

  /** @var \Drupal\Core\Entity\ContentEntityInterface $translation */
  $translation = $entity
    ->addTranslation('it');
  $translation
    ->save();
  $this
    ->assertTrue($entity
    ->isTranslatable());
}