/** * @dataProvider arraySet1 */ public function testReplace($array) { $replacements = ['k1' => 'test', 'k2' => 'test']; $a = new ArrayObject($array); $a->replace($replacements); $array = array_replace($array, $replacements); $this->assertSame($array, $a->val()); }