public function BundleEntityDuplicatorTest::testDuplicateNoId in Entity API 8
@covers ::duplicate
File
- tests/
src/ Kernel/ BundleEntityDuplicatorTest.php, line 70
Class
- BundleEntityDuplicatorTest
- Tests the bundle entity duplicator.
Namespace
Drupal\Tests\entity\KernelCode
public function testDuplicateNoId() {
$this
->expectException(\InvalidArgumentException::class);
$this
->expectExceptionMessage('The $values[\'id\'] key is empty or missing.');
$this->duplicator
->duplicate($this->bundleEntity, []);
}