You are here

protected function EntityShareClientFunctionalTestBase::getEntityId in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 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.

15 calls to EntityShareClientFunctionalTestBase::getEntityId()
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.
EntityShareAsyncFunctionalTest::testAsync in modules/entity_share_async/tests/src/Functional/EntityShareAsyncFunctionalTest.php
Test async feature.
FileDeletedTest::getEntitiesDataArray in modules/entity_share_client/tests/src/Functional/FileDeletedTest.php
Helper function to get a mapping of the entities data.
FileTest::getEntitiesDataArray in modules/entity_share_client/tests/src/Functional/FileTest.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 718

Class

EntityShareClientFunctionalTestBase
Base class for Entity share server 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;
}