public function EntityResourceTest::testGetRelationshipInternal in JSON:API 8
@covers ::getRelationship
File
- tests/
src/ Kernel/ Controller/ EntityResourceTest.php, line 789
Class
- EntityResourceTest
- @coversDefaultClass \Drupal\jsonapi\Controller\EntityResource @group jsonapi @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\ControllerCode
public function testGetRelationshipInternal() {
$internal_resource_type = new ResourceType('node', 'article', NULL, TRUE);
$resource = $this
->buildEntityResource('node', 'article', [
'field_relationships' => [
$internal_resource_type,
],
]);
$this
->setExpectedException(NotFoundHttpException::class);
$resource
->getRelationship($this->node, 'field_relationships', new Request());
}