function SessionTest::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::setUp()
  2. 10 core/tests/Drupal/FunctionalJavascriptTests/Core/Session/SessionTest.php \Drupal\FunctionalJavascriptTests\Core\Session\SessionTest::setUp()
  3. 11.x 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 28

Class

SessionTest
Tests that sessions don't expire.

Namespace

Drupal\FunctionalJavascriptTests\Core\Session

Code

protected function setUp() {
    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.