public void testListMiddle() throws Exception {
String str = "<?php list($a, $b, $c, $d) = array () ?>";
String expected = "<?php list($a, $b, $d) = array () ?>";
parseAndCompare(str, expected, new ICodeManiplator() {
public void manipulate(Program program) {
ExpressionStatement statement = (ExpressionStatement) program
.statements().get(0);
Assignment expression = (Assignment) statement.getExpression();
ListVariable list = (ListVariable) expression.getLeftHandSide();
list.variables().remove(2);
}
});
}