summaryrefslogtreecommitdiff
path: root/src/tests/harden_rand_noargs.phpt
diff options
context:
space:
mode:
authorjvoisin2019-01-14 19:29:25 +0000
committerGitHub2019-01-14 19:29:25 +0000
commite79f7e3bd992c7f0915ef9afe7afb6d79740527a (patch)
treef881c25694eb00da2331a9ab280ec1c24a5662ab /src/tests/harden_rand_noargs.phpt
parentc943db586ac46b686b49bdf61d8473e39dd93000 (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/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