PhpParser\NodeAbstractTest::testConstruct PHP Method

testConstruct() public method

public testConstruct ( array $attributes, phpparser\Node $node )
$attributes array
$node phpparser\Node
    public function testConstruct(array $attributes, Node $node)
    {
        $this->assertSame('Dummy', $node->getType());
        $this->assertSame(array('subNode1', 'subNode2'), $node->getSubNodeNames());
        $this->assertSame(10, $node->getLine());
        $this->assertSame('/** doc comment */', $node->getDocComment()->getText());
        $this->assertSame('value1', $node->subNode1);
        $this->assertSame('value2', $node->subNode2);
        $this->assertTrue(isset($node->subNode1));
        $this->assertTrue(isset($node->subNode2));
        $this->assertFalse(isset($node->subNode3));
        $this->assertSame($attributes, $node->getAttributes());
        return $node;
    }