getBundledNode example

$translation->save();

    $this->assertTrue($entity->isTranslatable());
  }

  /** * Tests that bundle translation settings are propagated on creation. * * @throws \Drupal\Core\Entity\EntityStorageException */
  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.");
  }

  /** * Tests that bundle translation setting changes are propagated. * * @throws \Drupal\Core\Entity\EntityStorageException * @throws \Exception */
  
Home | Imprint | This part of the site doesn't use cookies.