You are here

public function BundleEntityDuplicatorTest::testDuplicateInvalidEntity in Entity API 8

@covers ::duplicate

File

tests/src/Kernel/BundleEntityDuplicatorTest.php, line 61

Class

BundleEntityDuplicatorTest
Tests the bundle entity duplicator.

Namespace

Drupal\Tests\entity\Kernel

Code

public function testDuplicateInvalidEntity() {
  $this
    ->expectException(\InvalidArgumentException::class);
  $this
    ->expectExceptionMessage('The "action" entity type is not a bundle entity type.');
  $this->duplicator
    ->duplicate(Action::create(), []);
}