e.g. array(1,2,3,), array('Dodo'=>'Golo','Dafna'=>'Dodidu') array($a, $b=>foo(), 1=>$myClass->getFirst())
array(1,2,3,), array('Dodo'=>'Golo','Dafna'=>'Dodidu') array($a, $b=>foo(), 1=>$myClass->getFirst())
130131132133134135136137138139140141
String expected = "<?php array (1, 2, 3) ?>"; parseAndCompare(str, expected, new ICodeManiplator() { public void manipulate(Program program) { ExpressionStatement statement = (ExpressionStatement) program .statements().get(0); ArrayCreation expression = (ArrayCreation) statement .getExpression(); /* ArrayElement arrayElement = */expression.elements() .remove(0); } }); }
145146147148149150151152153154155156
String expected = "<?php array (0, 1, 2) ?>"; parseAndCompare(str, expected, new ICodeManiplator() { public void manipulate(Program program) { ExpressionStatement statement = (ExpressionStatement) program .statements().get(0); ArrayCreation expression = (ArrayCreation) statement .getExpression(); /* ArrayElement arrayElement = */expression.elements() .remove(3); } }); }
160161162163164165166167168169170171
String expected = "<?php array (0, 1, 3) ?>"; parseAndCompare(str, expected, new ICodeManiplator() { public void manipulate(Program program) { ExpressionStatement statement = (ExpressionStatement) program .statements().get(0); ArrayCreation expression = (ArrayCreation) statement .getExpression(); /* ArrayElement arrayElement = */expression.elements() .remove(2); } }); }
175176177178179180181182183184185186
String expected = "<?php array('Dafna'=>'Dodidu');?>"; parseAndCompare(str, expected, new ICodeManiplator() { public void manipulate(Program program) { ExpressionStatement statement = (ExpressionStatement) program .statements().get(0); ArrayCreation expression = (ArrayCreation) statement .getExpression(); /* ArrayElement arrayElement = */expression.elements() .remove(0); } }); }