function SessionTest::setUp

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::setUp()
  2. 8.9.x core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::setUp()
  3. 10 core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::setUp()

Overrides BrowserTestBase::setUp

File

core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php, line 30

Class

SessionTest
Tests that sessions don't expire.

Namespace

Drupal\FunctionalJavascriptTests\Core\Session

Code

protected function setUp() : void {
    parent::setUp();
    $account = $this->drupalCreateUser();
    $this->drupalLogin($account);
    $menu_link_content = MenuLinkContent::create([
        'title' => 'Link to front page',
        'menu_name' => 'tools',
        'link' => [
            'uri' => 'route:<front>',
        ],
    ]);
    $menu_link_content->save();
    $this->drupalPlaceBlock('system_menu_block:tools');
}

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