You are here

public function NativeSessionStorageTest::testCookieOptions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php \Symfony\Component\HttpFoundation\Tests\Session\Storage\NativeSessionStorageTest::testCookieOptions()

File

vendor/symfony/http-foundation/Tests/Session/Storage/NativeSessionStorageTest.php, line 149

Class

NativeSessionStorageTest
Test class for NativeSessionStorage.

Namespace

Symfony\Component\HttpFoundation\Tests\Session\Storage

Code

public function testCookieOptions() {
  $options = array(
    'cookie_lifetime' => 123456,
    'cookie_path' => '/my/cookie/path',
    'cookie_domain' => 'symfony.example.com',
    'cookie_secure' => true,
    'cookie_httponly' => false,
  );
  $this
    ->getStorage($options);
  $temp = session_get_cookie_params();
  $gco = array();
  foreach ($temp as $key => $value) {
    $gco['cookie_' . $key] = $value;
  }
  $this
    ->assertEquals($options, $gco);
}