PhpParser\Node\NameTest::testConstruct PHP Method

testConstruct() public method

public testConstruct ( )
    public function testConstruct()
    {
        $name = new Name(array('foo', 'bar'));
        $this->assertSame(array('foo', 'bar'), $name->parts);
        $name = new Name('foo\\bar');
        $this->assertSame(array('foo', 'bar'), $name->parts);
        $name = new Name($name);
        $this->assertSame(array('foo', 'bar'), $name->parts);
    }