You are here

public function SessionConfigurationTest::providerTestCookieSecure in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php \Drupal\Tests\Core\Session\SessionConfigurationTest::providerTestCookieSecure()

Data provider for the cookie secure test.

@returns array Test data

File

core/tests/Drupal/Tests/Core/Session/SessionConfigurationTest.php, line 144
Contains \Drupal\Tests\Core\Session\SessionConfigurationTest.

Class

SessionConfigurationTest
@coversDefaultClass \Drupal\Core\Session\SessionConfiguration @group Session

Namespace

Drupal\Tests\Core\Session

Code

public function providerTestCookieSecure() {
  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,
    ],
  ];
}