You are here

protected function EntityViewBuilderTest::setUp in Zircon Profile 8

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

Performs setup tasks before each individual test method is run.

Overrides EntityUnitTestBase::setUp

File

core/modules/system/src/Tests/Entity/EntityViewBuilderTest.php, line 28
Contains \Drupal\system\Tests\Entity\EntityViewBuilderTest.

Class

EntityViewBuilderTest
Tests the entity view builder.

Namespace

Drupal\system\Tests\Entity

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installConfig(array(
    'user',
    'entity_test',
  ));

  // Give anonymous users permission to view test entities.
  Role::load(RoleInterface::ANONYMOUS_ID)
    ->grantPermission('view test entity')
    ->save();
}