1--TEST--
2Test session_cache_limiter() function : basic functionality
3--SKIPIF--
4<?php include('skipif.inc'); ?>
5--FILE--
6<?php
7
8ob_start();
9
10/*
11 * Prototype : string session_cache_limiter([string $cache_limiter])
12 * Description : Get and/or set the current cache limiter
13 * Source code : ext/session/session.c
14 */
15
16echo "*** Testing session_cache_limiter() : basic functionality ***\n";
17
18var_dump(session_start());
19var_dump(session_cache_limiter());
20var_dump(session_cache_limiter("public"));
21var_dump(session_cache_limiter());
22var_dump(session_destroy());
23
24var_dump(session_start());
25var_dump(session_cache_limiter());
26var_dump(session_cache_limiter("private"));
27var_dump(session_cache_limiter());
28var_dump(session_destroy());
29
30var_dump(session_start());
31var_dump(session_cache_limiter());
32var_dump(session_cache_limiter("nocache"));
33var_dump(session_cache_limiter());
34var_dump(session_destroy());
35
36var_dump(session_start());
37var_dump(session_cache_limiter());
38var_dump(session_cache_limiter("private_no_expire"));
39var_dump(session_cache_limiter());
40var_dump(session_destroy());
41
42echo "Done";
43ob_end_flush();
44?>
45--EXPECTF--
46*** Testing session_cache_limiter() : basic functionality ***
47bool(true)
48string(7) "nocache"
49string(7) "nocache"
50string(6) "public"
51bool(true)
52bool(true)
53string(6) "public"
54string(6) "public"
55string(7) "private"
56bool(true)
57bool(true)
58string(7) "private"
59string(7) "private"
60string(7) "nocache"
61bool(true)
62bool(true)
63string(7) "nocache"
64string(7) "nocache"
65string(17) "private_no_expire"
66bool(true)
67Done
68
69