function UserKernelTestBase::setUp

Same name and namespace in other branches
  1. 11.x core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php \Drupal\Tests\user\Kernel\Views\UserKernelTestBase::setUp()

File

core/modules/user/tests/src/Kernel/Views/UserKernelTestBase.php, line 44

Class

UserKernelTestBase
Provides a common test base for user views tests.

Namespace

Drupal\Tests\user\Kernel\Views

Code

protected function setUp($import_test_views = TRUE) {
  parent::setUp();
  ViewTestData::createTestViews(static::class, [
    'user_test_views',
  ]);
  $this->installEntitySchema('user');
  $entity_type_manager = $this->container
    ->get('entity_type.manager');
  $this->roleStorage = $entity_type_manager->getStorage('user_role');
  $this->userStorage = $entity_type_manager->getStorage('user');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.