String str = "<?php class MyClass { const A = 4; } ; /**/MyClass::A;?>";
Program program = createAndParse(str);
final ExpressionStatement statement = (ExpressionStatement) program
.statements().get(2);
final StaticConstantAccess constantAccess = (StaticConstantAccess) statement
.getExpression();
IVariableBinding fieldBinding = (IVariableBinding) constantAccess
.resolveFieldBinding();
Assert.assertNotNull(fieldBinding);
Assert.assertTrue(fieldBinding.isField());
}