function RelatedResourceTypesTest::testGetRelatableResourceTypesByField
Same name in other branches
- 9 core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\RelatedResourceTypesTest::testGetRelatableResourceTypesByField()
- 8.9.x core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\RelatedResourceTypesTest::testGetRelatableResourceTypesByField()
- 10 core/modules/jsonapi/tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\RelatedResourceTypesTest::testGetRelatableResourceTypesByField()
@covers ::getRelatableResourceTypesByField @dataProvider getRelatableResourceTypesByFieldProvider
File
-
core/
modules/ jsonapi/ tests/ src/ Kernel/ ResourceType/ RelatedResourceTypesTest.php, line 169
Class
- RelatedResourceTypesTest
- @coversDefaultClass \Drupal\jsonapi\ResourceType\ResourceType @coversClass \Drupal\jsonapi\ResourceType\ResourceTypeRepository @group jsonapi
Namespace
Drupal\Tests\jsonapi\Kernel\ResourceTypeCode
public function testGetRelatableResourceTypesByField($entity_type_id, $bundle, $field) : void {
$resource_type = $this->resourceTypeRepository
->get($entity_type_id, $bundle);
$relatable_types = $resource_type->getRelatableResourceTypes();
$this->assertSame($relatable_types[$field], $resource_type->getRelatableResourceTypesByField($field));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.