diff options
author | Marcus Boerger <helly@php.net> | 2008-08-24 16:46:30 +0000 |
---|---|---|
committer | Marcus Boerger <helly@php.net> | 2008-08-24 16:46:30 +0000 |
commit | 0edbdd76808e1f5ed862c4e09faf2115a7ed2988 (patch) | |
tree | 8d67292de4a99ed41b5cb02553125fbee3257171 /ext/spl | |
parent | bfced427f74535865e5593e0d2146fa048eba3bb (diff) | |
download | php-git-0edbdd76808e1f5ed862c4e09faf2115a7ed2988.tar.gz |
- Add new test
Diffstat (limited to 'ext/spl')
-rwxr-xr-x | ext/spl/tests/iterator_068.phpt | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/spl/tests/iterator_068.phpt b/ext/spl/tests/iterator_068.phpt new file mode 100755 index 0000000000..4845708d43 --- /dev/null +++ b/ext/spl/tests/iterator_068.phpt @@ -0,0 +1,34 @@ +--TEST-- +SPL: Iterator: Overloaded object and destruction +--FILE-- +<?php + +class Test implements Iterator { + function foo() { + echo __METHOD__ . "()\n"; + } + function rewind() {} + function valid() {} + function current() {} + function key() {} + function next() {} +} + +class TestIteratorIterator extends IteratorIterator { + function __destruct() { + echo __METHOD__ . "()\n"; + $this->foo(); + } +} + +$obj = new TestIteratorIterator(new Test); +$obj->foo(); +unset($obj); + +?> +===DONE=== +--EXPECT-- +Test::foo() +TestIteratorIterator::__destruct() +Test::foo() +===DONE=== |