public void testDeleteForComponent1() throws Exception {
String str = "<?php for ($i = 1; $i <= 10; $i++) { echo $i; } ?>";
String expected = "<?php for (;;) { echo $i; } ?>";
parseAndCompare(str, expected, new ICodeManiplator() {
public void manipulate(Program program) {
ForStatement statement = (ForStatement) program.statements()
.get(0);
statement.initializers().remove(0);
statement.conditions().remove(0);
statement.updaters().remove(0);
}
});
}