Annotation of embedaddon/php/ext/spl/tests/spl_caching_iterator_constructor_flags.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: SPL: CachingInterator constructor flag checks
3: --CREDITS--
4: Sean Burlington www.practicalweb.co.uk
5: TestFest London May 2009
6: --FILE--
7: <?php
8: //line 681 ...
9: $array = array(array(7,8,9),1,2,3,array(4,5,6));
10: $arrayIterator = new ArrayIterator($array);
11: try {
12: $test = new CachingIterator($arrayIterator, 0);
13: $test = new CachingIterator($arrayIterator, 1);
14: $test = new CachingIterator($arrayIterator, 2);
15: $test = new CachingIterator($arrayIterator, 3); // this throws an exception
16: } catch (InvalidArgumentException $e){
17: print $e->getMessage() . "\n";
18: }
19:
20:
21: ?>
22: ===DONE===
23: --EXPECTF--
24: Flags must contain only one of CALL_TOSTRING, TOSTRING_USE_KEY, TOSTRING_USE_CURRENT, TOSTRING_USE_CURRENT
25: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>