You are here

public function BundleEntityDuplicatorTest::testDuplicateFieldsInvalidEntity in Entity API 8

@covers ::duplicateFields

File

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

Class

BundleEntityDuplicatorTest
Tests the bundle entity duplicator.

Namespace

Drupal\Tests\entity\Kernel

Code

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