protected function RevisionsTestTrait::getNewDraft in GraphQL 8.3
Returns a new, unpublished draft of given node.
Parameters
\Drupal\node\NodeInterface $node:
Return value
1 call to RevisionsTestTrait::getNewDraft()
- EntityRevisionsTest::testNodeContext in modules/
graphql_core/ tests/ src/ Kernel/ Entity/ EntityRevisionsTest.php - Regression test for unhandled logic exceptions.
File
- modules/
graphql_core/ tests/ src/ Traits/ RevisionsTestTrait.php, line 19
Class
- RevisionsTestTrait
- Helper methods associated with revisions.
Namespace
Drupal\Tests\graphql_core\TraitsCode
protected function getNewDraft(NodeInterface $node) {
$node
->setNewRevision();
$node
->isDefaultRevision(FALSE);
$node
->setPublished(FALSE);
return $node;
}