diff options
| author | jvoisin | 2019-01-14 19:29:25 +0000 |
|---|---|---|
| committer | GitHub | 2019-01-14 19:29:25 +0000 |
| commit | e79f7e3bd992c7f0915ef9afe7afb6d79740527a (patch) | |
| tree | f881c25694eb00da2331a9ab280ec1c24a5662ab /src/tests/dump_unserialize.phpt | |
| parent | c943db586ac46b686b49bdf61d8473e39dd93000 (diff) | |
Reorganize the testsuite
Splitting the testsuite in several components makes it easier to manage and comprehend.
This was also needed some some tests aren't passing on Alpine Linux, but we still want to run
as many of them as we can on this platform.
Diffstat (limited to 'src/tests/dump_unserialize.phpt')
| -rw-r--r-- | src/tests/dump_unserialize.phpt | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/tests/dump_unserialize.phpt b/src/tests/dump_unserialize.phpt deleted file mode 100644 index 592e9b0..0000000 --- a/src/tests/dump_unserialize.phpt +++ /dev/null | |||
| @@ -1,39 +0,0 @@ | |||
| 1 | --TEST-- | ||
| 2 | Dump unserialize | ||
| 3 | --SKIPIF-- | ||
| 4 | <?php | ||
| 5 | if (!extension_loaded("snuffleupagus")) { | ||
| 6 | print "skip"; | ||
| 7 | } | ||
| 8 | ?> | ||
| 9 | --POST-- | ||
| 10 | post_a=data_post_a&post_b=data_post_b | ||
| 11 | --GET-- | ||
| 12 | get_a=data_get_a&get_b=data_get_b | ||
| 13 | --COOKIE-- | ||
| 14 | cookie_a=data_cookie_a&cookie_b=data_cookie_b | ||
| 15 | --INI-- | ||
| 16 | sp.configuration_file={PWD}/config/dump_unserialize.ini | ||
| 17 | --FILE-- | ||
| 18 | <?php | ||
| 19 | @mkdir("/tmp/dump_result/"); | ||
| 20 | foreach (glob("/tmp/dump_result/sp_dump.*") as $dump) { | ||
| 21 | @unlink($dump); | ||
| 22 | } | ||
| 23 | |||
| 24 | echo "1\n"; | ||
| 25 | var_dump(unserialize('s:1:"a";alyualskdufyhalkdjsfhalkjdhflaksjdfhlkasdhflkahdawkuerylksjdfhlkssjgdflaksjdhflkasjdf')); | ||
| 26 | $filename = glob('/tmp/dump_result/sp_dump.*')[0]; | ||
| 27 | $res = file($filename); | ||
| 28 | if ($res[2] != "GET:get_a='data_get_a' get_b='data_get_b' \n") { | ||
| 29 | echo "1\n"; | ||
| 30 | } elseif ($res[3] != "POST:post_a='data_post_a' post_b='data_post_b' \n") { | ||
| 31 | echo "2\n"; | ||
| 32 | } elseif ($res[4] != "COOKIE:cookie_a='data_cookie_a&cookie_b=data_cookie_b' \n") { | ||
| 33 | echo "3\n"; | ||
| 34 | } | ||
| 35 | ?> | ||
| 36 | --EXPECTF-- | ||
| 37 | 1 | ||
| 38 | |||
| 39 | Fatal error: [snuffleupagus][unserialize] Invalid HMAC for s:1:"a";alyualskdufyhalkdjsfh in %a/src/tests/dump_unserialize.php on line 8 \ No newline at end of file | ||
