You are here

protected function UserPointsTransactionTest::prepareTargetEntity in User Points 8

Creates the target entity and saves it to be able to be referenced.

Overrides KernelTransactionTestBase::prepareTargetEntity

File

tests/src/Kernel/UserPointsTransactionTest.php, line 29

Class

UserPointsTransactionTest
Tests the user points transactor.

Namespace

Drupal\Tests\userpoints\Kernel

Code

protected function prepareTargetEntity() {
  $this
    ->installSchema('system', 'sequences');
  $this->targetEntity = User::create([
    'name' => 'admin',
  ]);
  $this->targetEntity
    ->save();
}