You are here

protected function KernelTransactionTestBase::prepareTransaction in Transaction 8

Creates and initializes a transaction to be tested.

2 calls to KernelTransactionTestBase::prepareTransaction()
GenericTransactionTest::testTransactionExecutionSequence in tests/src/Kernel/GenericTransactionTest.php
Tests the transaction execution sequence.
KernelTransactionTestBase::setUp in tests/src/Kernel/KernelTransactionTestBase.php

File

tests/src/Kernel/KernelTransactionTestBase.php, line 127

Class

KernelTransactionTestBase
Base class for kernel tests of the Transaction module.

Namespace

Drupal\Tests\transaction\Kernel

Code

protected function prepareTransaction() {
  $this->transaction = Transaction::create([
    'type' => $this->transactionType
      ->id(),
    'target_entity' => $this->targetEntity,
    'field_log_message' => $this->logMessage,
  ]);
}