summaryrefslogtreecommitdiff
path: root/src/tests/harden_rand_noargs.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/harden_rand_noargs.phpt')
-rw-r--r--src/tests/harden_rand_noargs.phpt62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/tests/harden_rand_noargs.phpt b/src/tests/harden_rand_noargs.phpt
deleted file mode 100644
index fdf8124..0000000
--- a/src/tests/harden_rand_noargs.phpt
+++ /dev/null
@@ -1,62 +0,0 @@
1--TEST--
2Harden rand without any arguments
3--SKIPIF--
4<?php if (!extension_loaded("snuffleupagus")) print "skip"; ?>
5--INI--
6sp.configuration_file={PWD}/config/harden_rand.ini
7We should fix this
8--FILE--
9<?php
10rand();
11mt_rand();
12
13rand(1);
14mt_rand(1);
15
16rand(1, 2);
17mt_rand(1, 2);
18
19rand(2, 1);
20mt_rand(2, 1);
21
22rand(2, 1, 0);
23mt_rand(2, 1, 0);
24
25rand("test", 1);
26mt_rand("test", 1);
27
28rand(1, "test");
29mt_rand(1, "test");
30
31rand(1, 2, "test");
32mt_rand(1, 2, "test");
33
34echo "Everything is fine\n";
35echo "Absolutely everything\n";
36echo 'Even with single quotes';
37?>
38--EXPECTF--
39Warning: rand() expects exactly 2 parameters, 1 given in %s/tests/harden_rand_noargs.php on line %d
40
41Warning: mt_rand() expects exactly 2 parameters, 1 given in %s/tests/harden_rand_noargs.php on line %d
42
43Warning: mt_rand(): max(1) is smaller than min(2) in %s/tests/harden_rand_noargs.php on line %d
44
45Warning: rand() expects exactly 2 parameters, 3 given in %s/tests/harden_rand_noargs.php on line %d
46
47Warning: mt_rand() expects exactly 2 parameters, 3 given in %s/tests/harden_rand_noargs.php on line %d
48
49Warning: rand() expects parameter 1 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
50
51Warning: mt_rand() expects parameter 1 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
52
53Warning: rand() expects parameter 2 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
54
55Warning: mt_rand() expects parameter 2 to be in%s, string given in %s/tests/harden_rand_noargs.php on line %d
56
57Warning: rand() expects exactly 2 parameters, 3 given in %s/tests/harden_rand_noargs.php on line %d
58
59Warning: mt_rand() expects exactly 2 parameters, 3 given in %s/tests/harden_rand_noargs.php on line %d
60Everything is fine
61Absolutely everything
62Even with single quotes