protected function KernelTransactionTestBase::prepareTargetEntity in Transaction 8
Creates the target entity and saves it to be able to be referenced.
1 call to KernelTransactionTestBase::prepareTargetEntity()
- KernelTransactionTestBase::setUp in tests/
src/ Kernel/ KernelTransactionTestBase.php
File
- tests/
src/ Kernel/ KernelTransactionTestBase.php, line 160
Class
- KernelTransactionTestBase
- Base class for kernel tests of the Transaction module.
Namespace
Drupal\Tests\transaction\KernelCode
protected function prepareTargetEntity() {
$this->targetEntity = EntityTest::create([
'name' => 'Target entity test',
]);
$this->targetEntity
->save();
}