public function merge(array $input) { $this->__->values = array_merge($this->__->values, $input); $this->__->json = json_encode($this->__->values); $this->extract(); }
public function test_it_merges_data() { $obj = new LiveFieldValue('{}', 12, 'field'); $obj->merge(['one' => 'two', 'buckle' => 'my shoe']); assertEquals('{"one":"two","buckle":"my shoe"}', $obj->toJSON()); }