function FieldResolverTest::testResolveInternalIncludePath

Same name and namespace in other branches
  1. 9 core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::testResolveInternalIncludePath()
  2. 8.9.x core/modules/jsonapi/tests/src/Kernel/Context/FieldResolverTest.php \Drupal\Tests\jsonapi\Kernel\Context\FieldResolverTest::testResolveInternalIncludePath()
  3. 11.x 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 92

Class

FieldResolverTest
@coversDefaultClass \Drupal\jsonapi\Context\FieldResolver[[api-linebreak]] @group jsonapi @group #slow

Namespace

Drupal\Tests\jsonapi\Kernel\Context

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.