function HalLinkManagerTest::testGetRelationInternalIds
Same name in other branches
- 9 core/modules/hal/tests/src/Kernel/HalLinkManagerTest.php \Drupal\Tests\hal\Kernel\HalLinkManagerTest::testGetRelationInternalIds()
@covers ::getRelationInternalIds
File
-
core/
modules/ hal/ tests/ src/ Kernel/ HalLinkManagerTest.php, line 253
Class
- HalLinkManagerTest
- @coversDefaultClass \Drupal\hal\LinkManager\LinkManager @group hal @group legacy
Namespace
Drupal\Tests\hal\KernelCode
public function testGetRelationInternalIds() {
/* @var \Drupal\rest\LinkManager\RelationLinkManagerInterface $relation_manager */
$relation_manager = \Drupal::service('hal.link_manager.relation');
$link = $relation_manager->getRelationUri('node', 'page', 'field_ref');
$internal_ids = $relation_manager->getRelationInternalIds($link);
$this->assertEquals([
'entity_type_id' => 'node',
'entity_type' => \Drupal::entityTypeManager()->getDefinition('node'),
'bundle' => 'page',
'field_name' => 'field_ref',
], $internal_ids);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.