You are here

public function LinkTest::testGetLinkRelationType in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php \Drupal\Tests\jsonapi\Unit\JsonApiResource\LinkTest::testGetLinkRelationType()
  2. 9 core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php \Drupal\Tests\jsonapi\Unit\JsonApiResource\LinkTest::testGetLinkRelationType()

@covers ::getLinkRelationType

File

core/modules/jsonapi/tests/src/Unit/JsonApiResource/LinkTest.php, line 124

Class

LinkTest
@coversDefaultClass \Drupal\jsonapi\JsonApiResource\Link @group jsonapi

Namespace

Drupal\Tests\jsonapi\Unit\JsonApiResource

Code

public function testGetLinkRelationType() {
  $this
    ->mockUrlAssembler();
  $link = new Link((new CacheableMetadata())
    ->addCacheTags([
    'foo',
  ]), Url::fromUri('https://jsonapi.org/foo'), 'self');
  $this
    ->assertSame('self', $link
    ->getLinkRelationType());
}