You are here

protected function ParagraphTest::getExpectedParagraphReferenceValue in Entity Share 8.3

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/ParagraphTest.php, line 142

Class

ParagraphTest
Functional test class for paragraphs.

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'),
    ],
  ];
}