function PathAliasTest::setUp

Same name and namespace in other branches
  1. 9 core/modules/path/tests/src/Functional/PathAliasTest.php \Drupal\Tests\path\Functional\PathAliasTest::setUp()
  2. 8.9.x core/modules/path/tests/src/Functional/PathAliasTest.php \Drupal\Tests\path\Functional\PathAliasTest::setUp()
  3. 11.x core/modules/path/tests/src/Functional/PathAliasTest.php \Drupal\Tests\path\Functional\PathAliasTest::setUp()

Overrides PathTestBase::setUp

File

core/modules/path/tests/src/Functional/PathAliasTest.php, line 34

Class

PathAliasTest
Tests modifying path aliases from the UI.

Namespace

Drupal\Tests\path\Functional

Code

protected function setUp() : void {
  parent::setUp();
  // Create test user and log in.
  $web_user = $this->drupalCreateUser([
    'create page content',
    'edit own page content',
    'administer url aliases',
    'create url aliases',
    'access content overview',
  ]);
  $this->drupalLogin($web_user);
  // The \Drupal\path_alias\AliasWhitelist service performs cache clears after
  // Drupal has flushed the response to the client. We use
  // WaitTerminateTestTrait to wait for Drupal to do this before continuing.
  $this->setWaitForTerminate();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.