function VersionNegotiatorTest::testOldRevision

Same name in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testOldRevision()
  2. 10 core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testOldRevision()
  3. 11.x core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testOldRevision()

@covers \Drupal\jsonapi\Revisions\VersionById::getRevision

File

core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php, line 125

Class

VersionNegotiatorTest
The test class for version negotiators.

Namespace

Drupal\Tests\jsonapi\Kernel\Revisions

Code

public function testOldRevision() {
    $revision = $this->versionNegotiator
        ->getRevision($this->node, 'id:' . $this->nodePreviousRevisionId);
    $this->assertEquals($this->node
        ->id(), $revision->id());
    $this->assertEquals($this->nodePreviousRevisionId, $revision->getRevisionId());
}

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