You are here

protected function BulkFormTest::loadNode in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/tests/src/Functional/Views/BulkFormTest.php \Drupal\Tests\node\Functional\Views\BulkFormTest::loadNode()

Load the specified node from the storage.

Parameters

int $id: The node identifier.

Return value

\Drupal\node\NodeInterface The loaded node.

2 calls to BulkFormTest::loadNode()
BulkFormTest::testBulkDeletion in core/modules/node/tests/src/Functional/Views/BulkFormTest.php
Tests multiple deletion.
BulkFormTest::testBulkForm in core/modules/node/tests/src/Functional/Views/BulkFormTest.php
Tests the node bulk form.

File

core/modules/node/tests/src/Functional/Views/BulkFormTest.php, line 293

Class

BulkFormTest
Tests a node bulk form.

Namespace

Drupal\Tests\node\Functional\Views

Code

protected function loadNode($id) {

  /** @var \Drupal\node\NodeStorage $storage */
  $storage = $this->container
    ->get('entity_type.manager')
    ->getStorage('node');
  $storage
    ->resetCache([
    $id,
  ]);
  return $storage
    ->load($id);
}