protected function KernelTransactionTestBase::setUp in Transaction 8
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ KernelTransactionTestBase.php, line 78
Class
- KernelTransactionTestBase
- Base class for kernel tests of the Transaction module.
Namespace
Drupal\Tests\transaction\KernelCode
protected function setUp() {
parent::setUp();
$this
->installEntitySchema('entity_test');
$this
->installEntitySchema('transaction');
$this
->installEntitySchema('user');
$this
->installConfig([
'system',
'user',
'transaction',
]);
// Grant the administrative transaction permissions.
Role::load(RoleInterface::ANONYMOUS_ID)
->grantPermission('administer transaction types')
->grantPermission('administer transactions')
->save();
$this
->prepareTransactionLogMessageField();
$this
->prepareTransactionType();
$this
->prepareTransactionOperation();
$this
->prepareTargetEntityLastTransactionField();
$this
->prepareTargetEntity();
$this
->prepareTransaction();
}