diff options
author | Zoe Slattery <zoe@php.net> | 2008-02-06 08:44:24 +0000 |
---|---|---|
committer | Zoe Slattery <zoe@php.net> | 2008-02-06 08:44:24 +0000 |
commit | a111cabedc410cf9e420b3f9f5a97b5c95c381b3 (patch) | |
tree | 5894ab41d408bf2920bc03c187df71ee28aea4b5 /ext/standard/tests/math/rand_error.phpt | |
parent | f23526528e1de4066ef434c02f42df90a260424f (diff) | |
download | php-git-a111cabedc410cf9e420b3f9f5a97b5c95c381b3.tar.gz |
Tests for assorted Maths functions
Diffstat (limited to 'ext/standard/tests/math/rand_error.phpt')
-rw-r--r-- | ext/standard/tests/math/rand_error.phpt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/standard/tests/math/rand_error.phpt b/ext/standard/tests/math/rand_error.phpt new file mode 100644 index 0000000000..79aa0112d3 --- /dev/null +++ b/ext/standard/tests/math/rand_error.phpt @@ -0,0 +1,18 @@ +--TEST-- +Test rand() - wrong params test rand() +--FILE-- +<?php +rand(25); +rand(10,100,false); +rand("one", 100); +rand(1, "hundered"); +?> +--EXPECTF-- + +Warning: rand() expects exactly 2 parameters, 1 given in %s on line 2 + +Warning: rand() expects exactly 2 parameters, 3 given in %s on line 3 + +Warning: rand() expects parameter 1 to be long, string given in %s on line 4 + +Warning: rand() expects parameter 2 to be long, string given in %s on line 5 |