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