gossi\codegen\tests\model\DocblockTest::testMethod PHP Метод

testMethod() публичный Метод

public testMethod ( )
    public function testMethod()
    {
        $expected = '/**
 * my method
 * 
 * my very long method
 * 
 * @see MyClass#myMethod see-desc
 * @param $a method-param
 * @throws \\Exception when something goes wrong
 * @return string this method returns a string
 */';
        $throws = new ThrowsTag('\\Exception when something goes wrong');
        $doc = new Docblock();
        $doc->appendTag($throws);
        $method = $this->getMethod();
        $method->setDocblock($doc);
        $method->generateDocblock();
        $docblock = $method->getDocblock();
        $see = new SeeTag('MyClass#myMethod see-desc');
        $docblock->appendTag($see);
        $this->assertSame($docblock, $doc);
        $this->assertEquals($expected, $docblock->toString());
    }