use of org.develnext.jphp.core.tokenizer.token.stmt.NamespaceStmtToken in project jphp by jphp-compiler.
the class NamespaceSyntaxTest method testMultiple.
@Test
public void testMultiple() {
List<Token> tree = getSyntaxTree("namespace A { 123; } namespace B { 321; }");
Assert.assertTrue(tree.size() == 4);
NamespaceStmtToken token = (NamespaceStmtToken) tree.get(0);
Assert.assertNotNull(token.getName());
Assert.assertEquals("A", token.getName().toName());
Assert.assertNull(token.getTree());
token = (NamespaceStmtToken) tree.get(2);
Assert.assertNotNull(token.getName());
Assert.assertEquals("B", token.getName().toName());
Assert.assertNull(token.getTree());
}
Aggregations