You are here

protected function PersistentLoginTest::setUp in Persistent Login 8

Overrides BrowserTestBase::setUp

File

Tests/src/Functional/PersistentLoginTest.php, line 29

Class

PersistentLoginTest
Tests the persistent login functionality.

Namespace

Drupal\Tests\persistent_login\Functional

Code

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

  // Mimic the required setup of the module by setting the session cookie
  // lifetime to 0.
  $parameters = $this->container
    ->getParameter('session.storage.options');
  $parameters['cookie_lifetime'] = 0;
  $this
    ->setContainerParameter('session.storage.options', $parameters);
  $this
    ->rebuildContainer();
  $this
    ->resetAll();

  // Create a test user.
  $this->user = $this
    ->createUser([], 'Garnett Tyrell');
}