You are here

protected function UserKernelTestBase::setUp in Zircon Profile 8

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

Parameters

bool $import_test_views: Should the views specififed on the test class be imported. If you need to setup some additional stuff, like fields, you need to call false and then call createTestViews for your own.

Overrides ViewKernelTestBase::setUp

File

core/modules/user/src/Tests/Views/UserKernelTestBase.php, line 46
Contains \Drupal\user\Tests\Views\UserKernelTestBase.

Class

UserKernelTestBase
Provides a common test base for user views tests.

Namespace

Drupal\user\Tests\Views

Code

protected function setUp() {
  parent::setUp();
  ViewTestData::createTestViews(get_class($this), array(
    'user_test_views',
  ));
  $this
    ->installEntitySchema('user');
  $entity_manager = $this->container
    ->get('entity.manager');
  $this->roleStorage = $entity_manager
    ->getStorage('user_role');
  $this->userStorage = $entity_manager
    ->getStorage('user');
}