summaryrefslogtreecommitdiff
path: root/ext/reflection/tests/027.phpt
blob: add38f14767d158b91bdb5e02e04f326d8537155 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
ReflectionGenerator::getTrace()
--FILE--
<?php
function foo()
{
    yield 1;
}

$g = foo();
$r = new ReflectionGenerator($g);

$g->next();

try {
    $r->getTrace();
} catch (ReflectionException $e) {
    echo $e->getMessage();
}
?>
--EXPECT--
Cannot fetch information from a terminated Generator