You are here

protected function PublisherTrackerTest::getTrackingTableColByUuid in Acquia Content Hub 8.2

Fetch tracking table column for a given uuid.

Parameters

string $entity_uuid: Entity Id.

string $col_name: Column name.

Return value

string|bool The tracking table respective data.

4 calls to PublisherTrackerTest::getTrackingTableColByUuid()
PublisherTrackerTest::testDelete in tests/src/Kernel/PublisherTrackerTest.php
Test case to delete the entity from tracking table.
PublisherTrackerTest::testInsertOrUpdate in tests/src/Kernel/PublisherTrackerTest.php
Test case to update the entity status.
PublisherTrackerTest::testNullifyHashes in tests/src/Kernel/PublisherTrackerTest.php
Test case to nullifies hashes.
PublisherTrackerTest::testSetQueueItemByUuid in tests/src/Kernel/PublisherTrackerTest.php
Test case to update the queue id.

File

tests/src/Kernel/PublisherTrackerTest.php, line 212

Class

PublisherTrackerTest
Tests publisher tracker methods.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

protected function getTrackingTableColByUuid(string $entity_uuid, string $col_name = 'entity_uuid') : ?string {
  $query = \Drupal::database()
    ->select(self::TABLE_NAME, 't');
  $query
    ->fields('t', [
    $col_name,
  ]);
  $query
    ->condition('entity_uuid', $entity_uuid);
  return $query
    ->execute()
    ->fetchField();
}