function SessionConfigurationTest::providerTestCookieSecure

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::providerTestCookieSecure()
  2. 10 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::providerTestCookieSecure()
  3. 9 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::providerTestCookieSecure()
  4. 8.9.x core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::providerTestCookieSecure()

Data provider for the cookie secure test.

Return value

array Test data

File

core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php, line 158

Class

SessionConfigurationTest
Tests Drupal\Core\Session\SessionConfiguration.

Namespace

Drupal\Tests\Core\Session

Code

public static function providerTestCookieSecure() : array {
  return [
    [
      'http://example.com/path/index.php',
      FALSE,
    ],
    [
      'https://www.example.com/path/index.php',
      TRUE,
    ],
    [
      'http://127.0.0.1/path/index.php',
      FALSE,
    ],
    [
      'https://127.0.0.1:8888/path/index.php',
      TRUE,
    ],
    [
      'http://[::1]/path/index.php',
      FALSE,
    ],
    [
      'https://[::1]:8888/path/index.php',
      TRUE,
    ],
  ];
}

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