public function testResultData() { $result = new Result(); ok($result->data(['data1' => 'value1', 'data2' => 'value2'])); ok($result->data('data1', 'value1')); ok($result->addData('data2', 'value2')); ok($result->mergeData(['data3' => 'value3', 'data4' => 'value4'])); }
/** * Add data to result object * * @param string $key * @param mixed $val */ public function addData($key, $val) { $this->result->addData($key, $val); }