public function RelatedResourceTypesTest::testGetRelatableResourceTypesByField in JSON:API 8.2
Same name and namespace in other branches
- 8 tests/src/Kernel/ResourceType/RelatedResourceTypesTest.php \Drupal\Tests\jsonapi\Kernel\ResourceType\RelatedResourceTypesTest::testGetRelatableResourceTypesByField()
@covers ::getRelatableResourceTypesByField @dataProvider getRelatableResourceTypesByFieldProvider
File
- tests/
src/ Kernel/ ResourceType/ RelatedResourceTypesTest.php, line 162
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) {
$resource_type = $this->resourceTypeRepository
->get($entity_type_id, $bundle);
$relatable_types = $resource_type
->getRelatableResourceTypes();
$this
->assertSame($relatable_types[$field], $resource_type
->getRelatableResourceTypesByField($field));
}