summaryrefslogtreecommitdiff
path: root/ext/session/tests/session_set_cookie_params_variation4.phpt
blob: 380defcd2ccb3d689e7c88b6dda2b21b18011a88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--TEST--
Test session_set_cookie_params() function : variation
--INI--
session.cookie_secure=TRUE
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php

ob_start();

echo "*** Testing session_set_cookie_params() : variation ***\n";

var_dump(ini_get("session.cookie_secure"));
var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE));
var_dump(ini_get("session.cookie_secure"));
var_dump(session_start());
var_dump(ini_get("session.cookie_secure"));
var_dump(session_set_cookie_params(3600, "/path", "blah", TRUE));
var_dump(ini_get("session.cookie_secure"));
var_dump(session_destroy());
var_dump(ini_get("session.cookie_secure"));
var_dump(session_set_cookie_params(3600, "/path", "blah", FALSE));
var_dump(ini_get("session.cookie_secure"));

echo "Done";
ob_end_flush();
?>
--EXPECTF--
*** Testing session_set_cookie_params() : variation ***
string(1) "1"
bool(true)
string(1) "0"
bool(true)
string(1) "0"

Warning: session_set_cookie_params(): Session cookie parameters cannot be changed when a session is active in %s on line %d
bool(false)
string(1) "0"
bool(true)
string(1) "0"
bool(true)
string(1) "0"
Done