Annotation of embedaddon/php/ext/tokenizer/tests/003.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: token_get_all() and wrong parameters
3: --SKIPIF--
4: <?php if (!extension_loaded("tokenizer")) print "skip"; ?>
5: --FILE--
6: <?php
7:
8: var_dump(token_get_all(array()));
9: var_dump(token_get_all(new stdClass));
10: var_dump(token_get_all(""));
11: var_dump(token_get_all(0));
12: var_dump(token_get_all(-1));
13:
14: echo "Done\n";
15: ?>
16: --EXPECTF--
17: Warning: token_get_all() expects parameter 1 to be string, array given in %s on line %d
18: NULL
19:
20: Warning: token_get_all() expects parameter 1 to be string, object given in %s on line %d
21: NULL
22: array(0) {
23: }
24: array(1) {
25: [0]=>
26: array(3) {
27: [0]=>
28: int(%d)
29: [1]=>
30: string(1) "0"
31: [2]=>
32: int(1)
33: }
34: }
35: array(1) {
36: [0]=>
37: array(3) {
38: [0]=>
39: int(%d)
40: [1]=>
41: string(2) "-1"
42: [2]=>
43: int(1)
44: }
45: }
46: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>