protected function TaxonomyEntityReferenceTest::getExpectedTaxonomyReferenceValue in Entity Share 8.2
Same name and namespace in other branches
- 8.3 modules/entity_share_client/tests/src/Functional/TaxonomyEntityReferenceTest.php \Drupal\Tests\entity_share_client\Functional\TaxonomyEntityReferenceTest::getExpectedTaxonomyReferenceValue()
Helper function.
After the value_callback is re-evaluated, the entity id will be changed. So need a specific checker_callback.
Parameters
\Drupal\Core\Entity\ContentEntityInterface $entity: The content entity.
string $field_name: The field to retrieve the value.
Return value
array The expected value after import.
File
- modules/
entity_share_client/ tests/ src/ Functional/ TaxonomyEntityReferenceTest.php, line 165
Class
- TaxonomyEntityReferenceTest
- Functional test class for taxonomy entity reference field.
Namespace
Drupal\Tests\entity_share_client\FunctionalCode
protected function getExpectedTaxonomyReferenceValue(ContentEntityInterface $entity, string $field_name) {
return [
[
'target_id' => $this
->getEntityId('taxonomy_term', 'child_tag'),
],
];
}