You are here

public function FieldResolverTest::testResolveInternalIncludePath in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::testResolveInternalIncludePath()

@covers ::resolveInternalEntityQueryPath @dataProvider resolveInternalIncludePathProvider

File

core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php, line 85

Class

FieldResolverTest
@coversDefaultClass \Drupal\jsonapi\Context\FieldResolver @group jsonapi

Namespace

Drupal\Tests\jsonapi\Kernel\Context

Code

public function testResolveInternalIncludePath($expect, $external_path, $entity_type_id = 'entity_test_with_bundle', $bundle = 'bundle1') {
  $path_parts = explode('.', $external_path);
  $resource_type = $this->resourceTypeRepository
    ->get($entity_type_id, $bundle);
  $this
    ->assertEquals($expect, $this->sut
    ->resolveInternalIncludePath($resource_type, $path_parts));
}