protected function LatestRevisionViewsFilterTest::createNodeType in Workbench Moderation 8.2
Same name and namespace in other branches
- 8 tests/src/Functional/LatestRevisionViewsFilterTest.php \Drupal\Tests\workbench_moderation\Functional\LatestRevisionViewsFilterTest::createNodeType()
Creates a new node type.
Parameters
string $label: The human-readable label of the type to create.
string $machine_name: The machine name of the type to create.
Return value
NodeType The node type just created.
1 call to LatestRevisionViewsFilterTest::createNodeType()
- LatestRevisionViewsFilterTest::testViewShowsCorrectNids in tests/
src/ Functional/ LatestRevisionViewsFilterTest.php
File
- tests/
src/ Functional/ LatestRevisionViewsFilterTest.php, line 123
Class
- LatestRevisionViewsFilterTest
- Tests the "Latest Revision" views filter.
Namespace
Drupal\Tests\workbench_moderation\FunctionalCode
protected function createNodeType($label, $machine_name) {
/** @var NodeType $node_type */
$node_type = NodeType::create([
'type' => $machine_name,
'label' => $label,
]);
$node_type
->save();
return $node_type;
}