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