You are here

public function PublisherTrackerTest::testGetQueueId in Acquia Content Hub 8.2

Test case to fetch the Queue ID for a given uuid.

@covers ::getQueueId

Throws

\Drupal\Core\Entity\EntityStorageException

File

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

Class

PublisherTrackerTest
Tests publisher tracker methods.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

public function testGetQueueId() {
  $uuid = $this->node
    ->uuid();

  // Queue id should not be empty when node is created.
  $queue_id_after = $this->publisherTracker
    ->getQueueId($uuid);
  $this
    ->assertNotEmpty($queue_id_after);

  // Delete the node.
  $this->node
    ->delete();

  // Queue id should be empty when node is deleted.
  $queue_id_before = $this->publisherTracker
    ->getQueueId($uuid);
  $this
    ->assertEmpty($queue_id_before);
}