You are here

public function RevisionLogDefaultTest::testRevisionLogBundleMissing in Revision Log Default 8

Tests when a bundle is missing/deleted.

File

tests/src/Kernel/RevisionLogDefaultTest.php, line 86

Class

RevisionLogDefaultTest
Tests the revision_log_default module.

Namespace

Drupal\Tests\revision_log_default\Kernel

Code

public function testRevisionLogBundleMissing() {
  $entity = RevisionLogEntityTest::create([
    'type' => $this
      ->randomMachineName(),
  ]);
  $entity
    ->save();

  // If the bundle doesnt exist then fall back to entity type label.
  $this
    ->assertEquals('Created new Revision log entity test', $entity
    ->getRevisionLogMessage());
}