public function testIsGenerator($php, $expectingGenerator) { $reflector = new FunctionReflector(new StringSourceLocator($php)); $function = $reflector->reflect('foo'); $this->assertSame($expectingGenerator, $function->isGenerator()); }