You are here

protected function EntityShareClientFunctionalTestBase::getEntityId in Entity Share 8.3

Same name and namespace in other branches
  1. 8.2 modules/entity_share_client/tests/src/Functional/EntityShareClientFunctionalTestBase.php \Drupal\Tests\entity_share_client\Functional\EntityShareClientFunctionalTestBase::getEntityId()

Helper function.

Parameters

string $entity_type_id: The entity type id.

string $entity_uuid: Then entity UUID.

Return value

string Return the entity ID if it exists. Empty string otherwise.

19 calls to EntityShareClientFunctionalTestBase::getEntityId()
AuthenticationAnonymousTest::getEntitiesDataArray in modules/entity_share_client/tests/src/Functional/AuthenticationAnonymousTest.php
Helper function to get a mapping of the entities data.
AuthenticationTestBase::getEntitiesDataArray in modules/entity_share_client/tests/src/Functional/AuthenticationTestBase.php
Helper function to get a mapping of the entities data.
ContentEntityReferenceTest::getEntitiesDataArray in modules/entity_share_client/tests/src/Functional/ContentEntityReferenceTest.php
Helper function to get a mapping of the entities data.
ContentEntityReferenceTest::getExpectedContentReferenceValue in modules/entity_share_client/tests/src/Functional/ContentEntityReferenceTest.php
Helper function.
EmbeddedEntityTest::getEntitiesDataArray in modules/entity_share_client/tests/src/Functional/EmbeddedEntityTest.php
Helper function to get a mapping of the entities data.

... See full list

File

modules/entity_share_client/tests/src/Functional/EntityShareClientFunctionalTestBase.php, line 908

Class

EntityShareClientFunctionalTestBase
Base class for Entity Share Client functional tests.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function getEntityId($entity_type_id, $entity_uuid) {
  $existing_entity_id = '';
  $existing_entity = $this
    ->loadEntity($entity_type_id, $entity_uuid);
  if (!is_null($existing_entity)) {
    $existing_entity_id = $existing_entity
      ->id();
  }
  return $existing_entity_id;
}