xref: /PHP-8.3/ext/spl/tests/iterator_058.phpt (revision b3e08881)
1--TEST--
2SPL: Iterator::__construct(void)
3--CREDITS--
4Sebastian Schürmann
5--FILE--
6<?php
7class myIterator implements Iterator {
8
9    function current(): mixed {}
10    function next(): void {}
11    function key(): mixed {}
12    function valid(): bool {}
13    function rewind(): void {}
14
15}
16try {
17    $it = new myIterator();
18} catch (InvalidArgumentException $e) {
19    echo 'InvalidArgumentException thrown';
20}
21echo 'no Exception thrown';
22?>
23--EXPECT--
24no Exception thrown
25