PhpParser\NodeAbstractTest::testGetDocComment PHP Method

testGetDocComment() public method

public testGetDocComment ( array $attributes, phpparser\Node $node )
$attributes array
$node phpparser\Node
    public function testGetDocComment(array $attributes, Node $node)
    {
        $this->assertSame('/** doc comment */', $node->getDocComment()->getText());
        array_pop($node->getAttribute('comments'));
        // remove doc comment
        $this->assertNull($node->getDocComment());
        array_pop($node->getAttribute('comments'));
        // remove comment
        $this->assertNull($node->getDocComment());
    }