xref: /PHP-8.0/ext/reflection/tests/027.phpt (revision f8d79582)
1--TEST--
2ReflectionGenerator::getTrace()
3--FILE--
4<?php
5function foo()
6{
7    yield 1;
8}
9
10$g = foo();
11$r = new ReflectionGenerator($g);
12
13$g->next();
14
15try {
16    $r->getTrace();
17} catch (ReflectionException $e) {
18    echo $e->getMessage();
19}
20?>
21--EXPECT--
22Cannot fetch information from a terminated Generator
23