summaryrefslogtreecommitdiff
path: root/ext/spl/tests/spl_iterator_caching_getcache_error.phpt
blob: 2ea4bd819b58e06d4a6423cda3bfb54ab49c4bb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--TEST--
SPL: Caching iterator getCache failure
--CREDITS--
Lukasz Andrzejak meltir@meltir.com
#testfest London 2009-05-09
--FILE--
<?php
$i = new ArrayIterator(array(1,1,1,1,1));
$i = new CachingIterator($i);
try {
  $i->getCache();
  echo "Should have caused an exception";
} catch (BadMethodCallException $e) {
  echo "Exception raised\n";
}

?>
===DONE===
--EXPECT--
Exception raised
===DONE===