function NodeDeprecationTest::testNodeRevisionLoadDeprecation

Same name and namespace in other branches
  1. 10 core/modules/node/tests/src/Kernel/NodeDeprecationTest.php \Drupal\Tests\node\Kernel\NodeDeprecationTest::testNodeRevisionLoadDeprecation()

Tests the deprecation of node_revision_load.

See also

node_revision_load()

File

core/modules/node/tests/src/Kernel/NodeDeprecationTest.php, line 29

Class

NodeDeprecationTest
Tests the deprecations in the <a href="/api/drupal/core%21modules%21node%21node.module/11.x" title="The core module that allows content to be submitted to the site." class="local">node.module</a> file.

Namespace

Drupal\Tests\node\Kernel

Code

public function testNodeRevisionLoadDeprecation() : void {
    $this->installEntitySchema('node');
    $this->expectDeprecation('node_revision_load is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \\Drupal\\Core\\Entity\\RevisionableStorageInterface::loadRevision instead. See https://www.drupal.org/node/3294237');
    node_revision_load(1);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.