summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorxXx-caillou-xXx2018-07-19 14:57:21 +0200
committerjvoisin2018-07-19 12:57:21 +0000
commita925690bb54fbfb30933f7090f646ce05b9d2c80 (patch)
treea78779d63ebfe653584af4498dada76c5d211a20 /src/tests
parent6a3cd5388c9ad188e80172c6a4815f68f5ffdcb6 (diff)
Fix the issue with rand hardening
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/harden_mt_rand_range.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/tests/harden_mt_rand_range.phpt b/src/tests/harden_mt_rand_range.phpt
new file mode 100644
index 0000000..0d5a5bf
--- /dev/null
+++ b/src/tests/harden_mt_rand_range.phpt
@@ -0,0 +1,16 @@
1--TEST--
2Harden mt_rand range
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/harden_rand.ini
7--FILE--
8<?php
9for ($i=0; $i <=100; $i++) {
10 if (mt_rand(0,1) > 1) {
11 echo "Failed\n";
12 }
13}
14
15?>
16--EXPECT--