mirror of
https://github.com/php/php-src.git
synced 2024-10-19 23:44:13 +00:00
21 lines
398 B
PHP
21 lines
398 B
PHP
--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===
|