PhpParser\ParserTest::testExtraAttributes PHP Method

testExtraAttributes() public method

public testExtraAttributes ( $code, $expectedAttributes )
    public function testExtraAttributes($code, $expectedAttributes)
    {
        $parser = $this->getParser(new Lexer());
        $stmts = $parser->parse("<?php {$code};");
        $attributes = $stmts[0]->getAttributes();
        foreach ($expectedAttributes as $name => $value) {
            $this->assertSame($value, $attributes[$name]);
        }
    }