protected function KernelTransactionTestBase::addTransactionLogMessageField in Transaction 8
Adds a log message field to the initialized transaction type to be tested.
2 calls to KernelTransactionTestBase::addTransactionLogMessageField()
- BalanceTransactionTest::prepareTransactionType in tests/
src/ Kernel/ BalanceTransactionTest.php - Creates and initializes the transaction type to be tested.
- GenericTransactionTest::prepareTransactionType in tests/
src/ Kernel/ GenericTransactionTest.php - Creates a generic transaction type.
File
- tests/
src/ Kernel/ KernelTransactionTestBase.php, line 180
Class
- KernelTransactionTestBase
- Base class for kernel tests of the Transaction module.
Namespace
Drupal\Tests\transaction\KernelCode
protected function addTransactionLogMessageField() {
// Adds the test log message field.
FieldConfig::create([
'field_name' => 'field_log_message',
'entity_type' => 'transaction',
'bundle' => $this->transactionType
->id(),
])
->save();
}