CG\Generator\PhpFunction::fromReflection add unit test and fix a bug

fix #18