You are here

protected function InlineBlockPrivateFilesTest::createNewNodeRevision in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockPrivateFilesTest::createNewNodeRevision()
  2. 10 core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php \Drupal\Tests\layout_builder\FunctionalJavascript\InlineBlockPrivateFilesTest::createNewNodeRevision()

Create a new revision of the node.

Parameters

int $node_id: The node id.

1 call to InlineBlockPrivateFilesTest::createNewNodeRevision()
InlineBlockPrivateFilesTest::testPrivateFiles in core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php
Test access to private files added via inline blocks in the layout builder.

File

core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php, line 294

Class

InlineBlockPrivateFilesTest
Test access to private files in block fields on the Layout Builder.

Namespace

Drupal\Tests\layout_builder\FunctionalJavascript

Code

protected function createNewNodeRevision($node_id) {
  $node = Node::load($node_id);
  $node
    ->setTitle('Update node');
  $node
    ->setNewRevision();
  $node
    ->save();
}