/** * @dataProvider arraySet1 */ public function testSplice($array) { $a = new ArrayObject($array); @$a->splice(0, -1, 'replacement'); $array = array_splice($array, 0, -1, 'replacement'); $this->assertSame($array, $a->val()); }