String str = "<?php class MyClass { public static $a = 4; } ; /**/MyClass::$a;?>";
Program program = createAndParse(str);
final ExpressionStatement statement = (ExpressionStatement) program
.statements().get(2);
final StaticFieldAccess staticFieldAcces = (StaticFieldAccess) statement
.getExpression();
IVariableBinding fieldBinding = staticFieldAcces.resolveFieldBinding();
Assert.assertTrue(fieldBinding.isField() == true);
Assert.assertTrue(fieldBinding.getName().equals("$a"));
Assert.assertTrue(fieldBinding.getKind() == IBinding.VARIABLE);
}