protected function EntityOperationsTest::createNodeType in Workbench Moderation 8
Same name and namespace in other branches
- 8.2 tests/src/Kernel/EntityOperationsTest.php \Drupal\Tests\workbench_moderation\Kernel\EntityOperationsTest::createNodeType()
Creates a page node type to test with, ensuring that it's moderatable.
1 call to EntityOperationsTest::createNodeType()
- EntityOperationsTest::setUp in tests/
src/ Kernel/ EntityOperationsTest.php
File
- tests/
src/ Kernel/ EntityOperationsTest.php, line 46
Class
- EntityOperationsTest
- Class EntityOperationsTest.
Namespace
Drupal\Tests\workbench_moderation\KernelCode
protected function createNodeType() {
$node_type = NodeType::create([
'type' => 'page',
'label' => 'Page',
]);
$node_type
->setThirdPartySetting('workbench_moderation', 'enabled', TRUE);
$node_type
->save();
}