'node', 'article', 'Drupal\node\Entity\Node'
],
['node', '42', 'Drupal\node\Entity\Node'
],
['node_type', 'node_type', 'Drupal\node\Entity\NodeType'
],
['menu', 'menu', 'Drupal\system\Entity\Menu'
],
];
} /**
* Ensures that the ResourceTypeRepository's cache does not become stale.
*/
public function testCaching() { $this->
assertEmpty($this->resourceTypeRepository->
get('node', 'article'
)->
getRelatableResourceTypesByField('field_relationship'
));
$this->
createEntityReferenceField('node', 'article', 'field_relationship', 'Related entity', 'node'
);
$this->
assertCount(3,
$this->resourceTypeRepository->
get('node', 'article'
)->
getRelatableResourceTypesByField('field_relationship'
));
NodeType::
create(['type' => 'camelids'
])->
save();
$this->
assertCount(4,
$this->resourceTypeRepository->
get('node', 'article'
)->
getRelatableResourceTypesByField('field_relationship'
));
} /**
* Ensures that a naming conflict in mapping causes an exception to be thrown.
*
* @covers ::getFields
* @dataProvider getFieldsProvider
*/