use of org.develnext.jphp.core.tokenizer.token.expr.value.macro.ClassMacroToken in project jphp by jphp-compiler.
the class TokenizerTest method testMacro.
@Test
public void testMacro() throws IOException {
Tokenizer tokenizer = new Tokenizer(new Context("__LINE__ __FILE__ __DIR__ __METHOD__ __FUNCTION__ __CLASS__ __NAMESPACE__ __TRAIT__"));
assertTrue(tokenizer.nextToken() instanceof LineMacroToken);
assertTrue(tokenizer.nextToken() instanceof FileMacroToken);
assertTrue(tokenizer.nextToken() instanceof DirMacroToken);
assertTrue(tokenizer.nextToken() instanceof MethodMacroToken);
assertTrue(tokenizer.nextToken() instanceof FunctionMacroToken);
assertTrue(tokenizer.nextToken() instanceof ClassMacroToken);
assertTrue(tokenizer.nextToken() instanceof NamespaceMacroToken);
assertTrue(tokenizer.nextToken() instanceof TraitMacroToken);
}
Aggregations