Annotation of embedaddon/php/ext/spl/tests/SplHeap_extract_invalid_parameter.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Check that SplHeap::extract generate a warning and returns NULL when param passed
3: --CREDITS--
4: PHPNW Testfest 2009 - Simon Westcott (swestcott@gmail.com)
5: --FILE--
6: <?php
7:
8: $data_provider = array(
9: new stdClass,
10: array(),
11: true,
12: "string",
13: 12345,
14: 1.2345,
15: NULL
16: );
17:
18: foreach($data_provider as $input) {
19:
20: $h = new SplMaxHeap();
21:
22: var_dump($h->extract($input));
23: }
24:
25: ?>
26: --EXPECTF--
27: Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
28: NULL
29:
30: Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
31: NULL
32:
33: Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
34: NULL
35:
36: Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
37: NULL
38:
39: Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
40: NULL
41:
42: Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
43: NULL
44:
45: Warning: SplHeap::extract() expects exactly 0 parameters, 1 given in %s on line %d
46: NULL
47:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>