/** * @dataProvider instanceProvider */ public function testToArrayMore(DiffOpRemove $diffOp) { $array = $diffOp->toArray(); $this->assertArrayHasKey('oldvalue', $array); }
private function applyDiffOpRemove(&$base, $key, DiffOpRemove $diffOp) { if (!array_key_exists($key, $base)) { $this->handleError('Cannot do a non-add operation with an element not present in a map'); return; } if (!$this->valuesAreEqual($base[$key], $diffOp->getOldValue())) { $this->handleError('Tried removing a map value that mismatches the current value'); return; } unset($base[$key]); }