summaryrefslogtreecommitdiff
path: root/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt
diff options
context:
space:
mode:
authorThibault "bui" Koechlin2017-12-28 13:37:10 +0100
committerjvoisin2017-12-28 13:37:10 +0100
commitbc4d0e014e9fb1edd05e6f9c91cbf97b6c5546b4 (patch)
treecad37642d9c1e5ef786f29c18a030c4a8a288af2 /src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt
parentfe057bba5baaef8fe428b971604194ef9c9119c0 (diff)
Implement regexp support for cookies encryption
It's now possible to encrypt cookies matching a specific regexp. This should close #106
Diffstat (limited to 'src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt')
-rw-r--r--src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt b/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt
new file mode 100644
index 0000000..1a740c0
--- /dev/null
+++ b/src/tests/encrypt_regexp_cookies_invalid_decryption2.phpt
@@ -0,0 +1,23 @@
1--TEST--
2Cookie encryption
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) die "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/config_encrypted_regexp_cookies.ini
7display_errors=1
8display_startup_errors=1
9error_reporting=E_ALL
10--COOKIE--
11super_cookie=1337;awful_cookie=awful_cookie_value;
12--ENV--
13return <<<EOF
14REMOTE_ADDR=127.0.0.1
15EOF;
16--FILE--
17<?php var_dump($_COOKIE); ?>
18--EXPECT--
19
20array(1) {
21 ["awful_cookie"]=>
22 string(18) "awful_cookie_value"
23}