function ContentTranslationEntityBundleInfoTest::getBundledNode
Same name in other branches
- 9 core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationEntityBundleInfoTest::getBundledNode()
- 8.9.x core/modules/content_translation/tests/src/Kernel/ContentTranslationEntityBundleInfoTest.php \Drupal\Tests\content_translation\Kernel\ContentTranslationEntityBundleInfoTest::getBundledNode()
- 11.x 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 propagated on creation.
- ContentTranslationEntityBundleInfoTest::testBundleClearOnLanguageContentSettingUpdate in core/
modules/ content_translation/ tests/ src/ Kernel/ ContentTranslationEntityBundleInfoTest.php - Tests that bundle translation setting changes are propagated.
File
-
core/
modules/ content_translation/ tests/ src/ Kernel/ ContentTranslationEntityBundleInfoTest.php, line 140
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',
'name' => 'Bundle Test',
]);
$bundle->save();
$node = Node::create([
'type' => 'bundle_test',
]);
return $node;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.