gossi\codegen\tests\parser\FunctionParserTest::testFromReflection PHP Method

testFromReflection() public method

public testFromReflection ( )
    public function testFromReflection()
    {
        $doc = new Docblock('/**
 * Makes foo with bar
 *
 * @param string $baz
 * @return string
 */');
        $function = new PhpFunction('wurst');
        $function->addParameter(PhpParameter::create('baz')->setValue(null)->setType('string'))->setBody('return \'wurst\';')->setDocblock($doc)->setDescription($doc->getShortDescription())->setLongDescription($doc->getLongDescription());
        $this->assertEquals($function, PhpFunction::fromReflection(new \ReflectionFunction('wurst')));
    }
FunctionParserTest