You are here

protected function RedirectImportExportTest::assertNodeRevisionCount in Acquia Content Hub 8.2

Check if nodes with circular dependencies have no stub revisions created.

Parameters

string $uuid: The node UUID to check.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

1 call to RedirectImportExportTest::assertNodeRevisionCount()
RedirectImportExportTest::testRedirectImportExport in tests/src/Kernel/RedirectImportExportTest.php
Tests "redirect" Drupal entity.

File

tests/src/Kernel/RedirectImportExportTest.php, line 190

Class

RedirectImportExportTest
Tests redirect export and import.

Namespace

Drupal\Tests\acquia_contenthub\Kernel

Code

protected function assertNodeRevisionCount(string $uuid) {

  /** @var \Drupal\Node\NodeStorageInterface $node_storage */
  $node_storage = $this->entityTypeManager
    ->getStorage('node');

  /** @var \Drupal\node\Entity\Node $node */
  $node = $this
    ->loadByUuid('node', $uuid);
  $vids = $node_storage
    ->revisionIds($node);
  $this
    ->assertEquals(count($vids), 1, 'No revisions were created from stubs.');
}