summaryrefslogtreecommitdiff
path: root/tests/session
diff options
context:
space:
mode:
authorStefan Esser2014-02-15 12:18:37 +0100
committerStefan Esser2014-02-15 12:18:37 +0100
commit13d2a1cbba22ead86f54f1764ca4f87857059803 (patch)
tree74baa31bfd2e1ee92b298f9960762e9faab4f152 /tests/session
parent71c70de8df61ff1446efb1c168d3c2deccf58586 (diff)
Adding a few more session id tests
Diffstat (limited to 'tests/session')
-rw-r--r--tests/session/PHPSESSID_max_id_length_ok.phpt15
-rw-r--r--tests/session/PHPSESSID_max_id_length_toolong.phpt15
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/session/PHPSESSID_max_id_length_ok.phpt b/tests/session/PHPSESSID_max_id_length_ok.phpt
new file mode 100644
index 0000000..0bb90bc
--- /dev/null
+++ b/tests/session/PHPSESSID_max_id_length_ok.phpt
@@ -0,0 +1,15 @@
1--TEST--
2PHPSESSID session id not too long
3--SKIPIF--
4<?php include "../skipifcli.inc"; ?>
5--INI--
6suhosin.session.max_id_length=32
7--COOKIE--
8PHPSESSID=12345678901234567890123456789012;
9--FILE--
10<?php
11session_start();
12echo session_id();
13?>
14--EXPECTF--
1512345678901234567890123456789012 \ No newline at end of file
diff --git a/tests/session/PHPSESSID_max_id_length_toolong.phpt b/tests/session/PHPSESSID_max_id_length_toolong.phpt
new file mode 100644
index 0000000..e6667b1
--- /dev/null
+++ b/tests/session/PHPSESSID_max_id_length_toolong.phpt
@@ -0,0 +1,15 @@
1--TEST--
2PHPSESSID session id too long
3--SKIPIF--
4<?php include "../skipifcli.inc"; ?>
5--INI--
6suhosin.session.max_id_length=32
7--COOKIE--
8PHPSESSID=123456789012345678901234567890123;
9--FILE--
10<?php
11session_start();
12echo strlen(session_id());
13?>
14--EXPECTF--
1532 \ No newline at end of file