You are here

public function BundleEntityDuplicatorTest::testDuplicateDisplaysInvalidEntity in Entity API 8

@covers ::duplicateDisplays

File

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

Class

BundleEntityDuplicatorTest
Tests the bundle entity duplicator.

Namespace

Drupal\Tests\entity\Kernel

Code

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