public function VersionNegotiatorTest::testLatestVersion in Drupal 8
Same name and namespace in other branches
- 9 core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testLatestVersion()
@covers \Drupal\jsonapi\Revisions\VersionByRel::getRevision
File
- core/
modules/ jsonapi/ tests/ src/ Kernel/ Revisions/ VersionNegotiatorTest.php, line 143
Class
- VersionNegotiatorTest
- The test class for version negotiators.
Namespace
Drupal\Tests\jsonapi\Kernel\RevisionsCode
public function testLatestVersion() {
$revision = $this->versionNegotiator
->getRevision($this->node, 'rel:' . VersionByRel::LATEST_VERSION);
$this
->assertEquals($this->node
->id(), $revision
->id());
$this
->assertEquals($this->node
->getRevisionId(), $revision
->getRevisionId());
}