public function EntityResourceTest::testGetRelatedInternal in JSON:API 8
@covers ::getRelated
File
- tests/src/ Kernel/ Controller/ EntityResourceTest.php, line 776 
Class
- EntityResourceTest
- @coversDefaultClass \Drupal\jsonapi\Controller\EntityResource @group jsonapi @group legacy
Namespace
Drupal\Tests\jsonapi\Kernel\ControllerCode
public function testGetRelatedInternal() {
  $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());
}