You are here

public function SessionConfigurationTest::providerTestGeneratedCookieDomain 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::providerTestGeneratedCookieDomain()

Data provider for the cookie domain test.

@returns array Test data

File

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

Class

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

Namespace

Drupal\Tests\Core\Session

Code

public function providerTestGeneratedCookieDomain() {
  return [
    [
      'http://example.com/path/index.php',
      '.example.com',
    ],
    [
      'http://www.example.com/path/index.php',
      '.www.example.com',
    ],
    [
      'http://subdomain.example.com/path/index.php',
      '.subdomain.example.com',
    ],
    [
      'http://example.com:8080/path/index.php',
      '.example.com',
    ],
    [
      'https://example.com/path/index.php',
      '.example.com',
    ],
    [
      'http://localhost/path/index.php',
      '',
    ],
    [
      'http://127.0.0.1/path/index.php',
      '',
    ],
    [
      'http://127.0.0.1:8888/path/index.php',
      '',
    ],
    [
      'http://1.1.1.1/path/index.php',
      '',
    ],
    [
      'http://[::1]/path/index.php',
      '',
    ],
    [
      'http://[::1]:8888/path/index.php',
      '',
    ],
  ];
}