You are here

public function PersistentLoginTest::loginProvider in Persistent Login 8

Data provider for testPersistentLogin().

Return value

array An array of test cases. Each test case is an array containing a boolean that indicates whether or not the "Remember me" option should be checked when logging in and a message for the assertion.

File

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

Class

PersistentLoginTest
Tests the persistent login functionality.

Namespace

Drupal\Tests\persistent_login\Functional

Code

public function loginProvider() {
  return [
    [
      // When the "Remember me" functionality is not enabled, the user should
      // not be logged in after starting a new session.
      FALSE,
      'The user should not be logged in after starting a new session.',
    ],
    [
      // When the "Remember me" functionality is enabled, the user should be
      // logged in after starting a new session.
      TRUE,
      'The user should be logged in after starting a new session.',
    ],
  ];
}