You are here

protected function ProfileTokenTest::setUp in Profile 8

Overrides EntityKernelTestBase::setUp

File

tests/src/Kernel/ProfileTokenTest.php, line 57

Class

ProfileTokenTest
Tests token resolution for profiles.

Namespace

Drupal\Tests\profile\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installEntitySchema('profile');
  $this
    ->installEntitySchema('view');
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installConfig(self::$modules);

  /** @var EntityTypeManagerInterface $entity_type_manager */
  $entity_type_manager = $this->container
    ->get('entity_type.manager');
  $this->profileStorage = $entity_type_manager
    ->getStorage('profile');
  $this->viewBuilder = $entity_type_manager
    ->getViewBuilder('profile');
  $this->user = $this
    ->createUser();
}