You are here

public function ContentTranslationEntityBundleInfoTest::testBundleClearOnLanguageContentSettingInsert 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::testBundleClearOnLanguageContentSettingInsert()
  2. 9 core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationEntityBundleInfoTest::testBundleClearOnLanguageContentSettingInsert()

Tests that bundle translation settings are propagated on creation.

Throws

\Drupal\Core\Entity\EntityStorageException

File

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

Class

ContentTranslationEntityBundleInfoTest
Tests the Content Translation bundle info logic.

Namespace

Drupal\Tests\content_translation\Kernel

Code

public function testBundleClearOnLanguageContentSettingInsert() {
  $node = $this
    ->getBundledNode();
  $this
    ->assertFalse($node
    ->isTranslatable());
  $this->contentTranslationManager
    ->setEnabled('node', 'bundle_test', TRUE);
  $this
    ->assertTrue($node
    ->isTranslatable(), "Bundle info was not cleared on language_content_settings creation.");
}