You are here

protected function ParagraphEntityReferenceTest::getExpectedParagraphReferenceValue in Entity Share 8.2

Helper function.

After the value_callback is re-evaluated, the nid 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/ParagraphEntityReferenceTest.php, line 98

Class

ParagraphEntityReferenceTest
Functional test class for paragraph entity reference field.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function getExpectedParagraphReferenceValue(ContentEntityInterface $entity, string $field_name) {
  return [
    [
      'target_id' => $this
        ->getEntityId('paragraph', 'es_test_paragraph'),
      'target_revision_id' => $this
        ->getEntityRevisionId('paragraph', 'es_test_paragraph'),
    ],
  ];
}