public function testIsGeneratorWhenNodeNotSet()
{
$php = '<?php function foo() { yield 1; }';
$reflector = new FunctionReflector(new StringSourceLocator($php));
$functionInfo = $reflector->reflect('foo');
$rfaRef = new \ReflectionClass('\\BetterReflection\\Reflection\\ReflectionFunctionAbstract');
$rfaRefNode = $rfaRef->getProperty('node');
$rfaRefNode->setAccessible(true);
$rfaRefNode->setValue($functionInfo, null);
$this->assertFalse($functionInfo->isGenerator());
}