You are here

protected function EntityRevisionsTest::setUp in Drupal 9

Same name in this branch
  1. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityRevisionsTest.php \Drupal\KernelTests\Core\Entity\EntityRevisionsTest::setUp()
  2. 9 core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php \Drupal\Tests\system\Functional\Entity\EntityRevisionsTest::setUp()
Same name and namespace in other branches
  1. 8 core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php \Drupal\Tests\system\Functional\Entity\EntityRevisionsTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/system/tests/src/Functional/Entity/EntityRevisionsTest.php, line 39

Class

EntityRevisionsTest
Create a entity with revisions and test viewing, saving, reverting, and deleting revisions.

Namespace

Drupal\Tests\system\Functional\Entity

Code

protected function setUp() : void {
  parent::setUp();

  // Create and log in user.
  $this->webUser = $this
    ->drupalCreateUser([
    'administer entity_test content',
    'view test entity',
  ]);
  $this
    ->drupalLogin($this->webUser);

  // Enable an additional language.
  ConfigurableLanguage::createFromLangcode('de')
    ->save();
}