protected function ContentTranslationEntityBundleInfoTest::getBundledNode in Drupal 8
Same name and namespace in other branches
- 9 core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationEntityBundleInfoTest::getBundledNode()
- 10 core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationEntityBundleInfoTest::getBundledNode()
Gets a new bundled node for testing.
Return value
\Drupal\node\Entity\Node The new node.
Throws
\Drupal\Core\Entity\EntityStorageException
2 calls to ContentTranslationEntityBundleInfoTest::getBundledNode()
- ContentTranslationEntityBundleInfoTest::testBundleClearOnLanguageContentSettingInsert in core/modules/ content_translation/ tests/ src/ Kernel/ ContentTranslationEntityBundleInfoTest.php 
- Tests that bundle translation settings are propegated on creation.
- ContentTranslationEntityBundleInfoTest::testBundleClearOnLanguageContentSettingUpdate in core/modules/ content_translation/ tests/ src/ Kernel/ ContentTranslationEntityBundleInfoTest.php 
- Tests that bundle translation setting changes are propegated.
File
- core/modules/ content_translation/ tests/ src/ Kernel/ ContentTranslationEntityBundleInfoTest.php, line 138 
Class
- ContentTranslationEntityBundleInfoTest
- Tests the Content Translation bundle info logic.
Namespace
Drupal\Tests\content_translation\KernelCode
protected function getBundledNode() {
  $this
    ->installEntitySchema('node');
  $bundle = NodeType::create([
    'type' => 'bundle_test',
    'label' => 'Bundle Test',
  ]);
  $bundle
    ->save();
  $node = Node::create([
    'type' => 'bundle_test',
  ]);
  return $node;
}