You are here

protected function BulkFormTest::loadNode in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/Tests/Views/BulkFormTest.php \Drupal\node\Tests\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/src/Tests/Views/BulkFormTest.php
Test multiple deletion.
BulkFormTest::testBulkForm in core/modules/node/src/Tests/Views/BulkFormTest.php
Tests the node bulk form.

File

core/modules/node/src/Tests/Views/BulkFormTest.php, line 273
Contains \Drupal\node\Tests\Views\BulkFormTest.

Class

BulkFormTest
Tests a node bulk form.

Namespace

Drupal\node\Tests\Views

Code

protected function loadNode($id) {

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