You are here

protected function ExportTest::deleteNodes in Acquia Content Hub 8.2

Deletes nodes.

Parameters

int[] $nids: Node nids.

array $cdf_expectations: CDF expectations.

Throws

\Drupal\Core\Entity\EntityStorageException

2 calls to ExportTest::deleteNodes()
ExportTest::testDelete in tests/src/Kernel/ExportTest.php
Tests deleting content.
ExportTest::testQueue in tests/src/Kernel/ExportTest.php
Tests Acquia ContentHub export queue.

File

tests/src/Kernel/ExportTest.php, line 1213

Class

ExportTest
Tests entity exports.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

protected function deleteNodes(array $nids, array &$cdf_expectations = []) {
  foreach ($nids as $nid) {
    $node = Node::load($nid);
    $uuid = $node
      ->uuid();
    $node
      ->delete();
    $trackRecord = $this->publisherTracker
      ->get($uuid);
    $this
      ->assertEmpty($trackRecord, "No tracking record for deleted entity.");
    $cdf_expectations[] = TRUE;
  }
}