public void testDeleteBlockFirst() throws Exception {
String str = "<?php if ($a) { $a = 5; $b = 4; $c = 4; } ?>";
String expected = "<?php if ($a) { $b = 4; $c = 4; } ?>";
parseAndCompare(str, expected, new ICodeManiplator() {
public void manipulate(Program program) {
IfStatement statement = (IfStatement) program.statements().get(
0);
Block block = (Block) statement.getTrueStatement();
block.statements().remove(0);
}
});
}