public function testAddExtraEntriesIfAllowAdd($allowDelete) { $originalData =
$this->
getData([1 => 'second'
]);
$newData =
$this->
getData([0 => 'first', 1 => 'second', 2 => 'third'
]);
$listener =
new MergeCollectionListener(true,
$allowDelete);
$this->form->
setData($originalData);
$event =
new FormEvent($this->form,
$newData);
$listener->
onSubmit($event);
// The original object was modified
if (\
is_object($originalData)) { $this->
assertSame($originalData,
$event->
getData());
} // The original object matches the new object
$this->
assertEquals($newData,
$event->
getData());
} /**
* @dataProvider getBooleanMatrix1
*/