You are here

protected function ReExportTest::deleteQueueItem in Acquia Content Hub 8.2

Deletes Item from Queue and tracking table.

Parameters

string $uuid: The Entity UUID.

Throws

\Exception

1 call to ReExportTest::deleteQueueItem()
ReExportTest::setUp in modules/acquia_contenthub_publisher/tests/src/Kernel/EventSubscriber/HandleWebhook/ReExportTest.php

File

modules/acquia_contenthub_publisher/tests/src/Kernel/EventSubscriber/HandleWebhook/ReExportTest.php, line 290

Class

ReExportTest
Tests Re-export functionality from a Webhook.

Namespace

Drupal\Tests\acquia_contenthub_publisher\Kernel\EventSubscriber\HandleWebhook

Code

protected function deleteQueueItem(string $uuid) {
  $item_id = $this->tracker
    ->getQueueId($uuid);
  if ($item_id) {
    $item = $this->publisherQueue
      ->claimItem();
    if ($item_id === $item->item_id) {
      $this->publisherQueue
        ->deleteItem($item);
    }
  }
  $this->tracker
    ->delete($uuid);
}