You are here

protected function DeleteActionTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php \Drupal\KernelTests\Core\Action\DeleteActionTest::setUp()

Overrides KernelTestBase::setUp

File

core/tests/Drupal/KernelTests/Core/Action/DeleteActionTest.php, line 26

Class

DeleteActionTest
@group Action

Namespace

Drupal\KernelTests\Core\Action

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('entity_test_mulrevpub');
  $this
    ->installEntitySchema('user');
  $this
    ->installSchema('system', [
    'sequences',
    'key_value_expire',
  ]);
  $this->testUser = User::create([
    'name' => 'foobar',
    'mail' => 'foobar@example.com',
  ]);
  $this->testUser
    ->save();
  \Drupal::service('current_user')
    ->setAccount($this->testUser);
}