function VersionNegotiatorTest::testInvalidRevisionRel
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testInvalidRevisionRel()
- 8.9.x core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testInvalidRevisionRel()
- 10 core/modules/jsonapi/tests/src/Kernel/Revisions/VersionNegotiatorTest.php \Drupal\Tests\jsonapi\Kernel\Revisions\VersionNegotiatorTest::testInvalidRevisionRel()
@covers \Drupal\jsonapi\Revisions\VersionByRel::getRevision
File
-
core/
modules/ jsonapi/ tests/ src/ Kernel/ Revisions/ VersionNegotiatorTest.php, line 168
Class
- VersionNegotiatorTest
- The test class for version negotiators.
Namespace
Drupal\Tests\jsonapi\Kernel\RevisionsCode
public function testInvalidRevisionRel() : void {
$this->expectException(CacheableBadRequestHttpException::class);
$this->expectExceptionMessage('An invalid resource version identifier, `rel:erroneous-revision-name`, was provided.');
$this->versionNegotiator
->getRevision($this->node, 'rel:erroneous-revision-name');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.