You are here

protected function UserFieldsTest::setUp in Zircon Profile 8

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

Performs setup tasks before each individual test method is run.

Overrides KernelTestBase::setUp

File

core/modules/user/src/Tests/UserFieldsTest.php, line 30
Contains \Drupal\user\Tests\UserFieldsTest.

Class

UserFieldsTest
Tests available user fields in twig.

Namespace

Drupal\user\Tests

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('user');

  // Set up a test theme that prints the user's mail field.
  \Drupal::service('theme_handler')
    ->install(array(
    'user_test_theme',
  ));
  \Drupal::theme()
    ->setActiveTheme(\Drupal::service('theme.initialization')
    ->initTheme('user_test_theme'));

  // Clear the theme registry.
  $this->container
    ->set('theme.registry', NULL);
}