You are here

protected function DeleteActionTest::setUp in Entity API 8.0

Overrides KernelTestBase::setUp

File

tests/src/Kernel/DeleteActionTest.php, line 39
Contains \Drupal\Tests\entity\Kernel\DeleteActionTest.

Class

DeleteActionTest
Tests the delete entity action. @group entity

Namespace

Drupal\Tests\entity\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('entity_test_enhanced');
  $this
    ->installSchema('system', [
    'key_value_expire',
    'sequences',
  ]);
  $bundle = EnhancedEntityBundle::create([
    'id' => 'default',
    'label' => 'Default',
  ]);
  $bundle
    ->save();
  $this->user = User::create([
    'name' => 'username',
    'status' => 1,
  ]);
  $this->user
    ->save();
  \Drupal::service('current_user')
    ->setAccount($this->user);
}