function VersionNegotiatorTest::testInvalidRevisionId
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testInvalidRevisionId()
- 8.9.x core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testInvalidRevisionId()
- 10 core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testInvalidRevisionId()
@covers \Drupal\jsonapi\Revisions\VersionById::getRevision
File
-
core/
modules/ jsonapi/ tests/ src/ Kernel/ Revisions/ VersionNegotiatorTest.php, line 140
Class
- VersionNegotiatorTest
- The test class for version negotiators.
Namespace
Drupal\Tests\jsonapi\Kernel\RevisionsCode
public function testInvalidRevisionId() : void {
$this->expectException(CacheableNotFoundHttpException::class);
$this->expectExceptionMessage(sprintf('The requested version, identified by `id:%s`, could not be found.', $this->node2
->getRevisionId()));
$this->versionNegotiator
->getRevision($this->node, 'id:' . $this->node2
->getRevisionId());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.