You are here

public function PublisherTrackerTest::testListTrackedEntities in Acquia Content Hub 8.2

Test case to list tracked entities in tracking table.

@covers ::listTrackedEntities

Throws

\Drupal\Core\Entity\EntityStorageException

File

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

Class

PublisherTrackerTest
Tests publisher tracker methods.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

public function testListTrackedEntities() : void {
  $list_tracked_entities_after = $this->publisherTracker
    ->listTrackedEntities('queued', 'node');
  $this
    ->assertNotEmpty($list_tracked_entities_after);

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

  // Make sure that node is deleted from the tracking table also.
  $list_tracked_entities_before = $this->publisherTracker
    ->listTrackedEntities('queued', 'node');
  $this
    ->assertEmpty($list_tracked_entities_before);
}