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'])); }
/** * Report error * * @param string $message Error message * * @return false */ protected function error($message, array $data = null) { $this->result->error($message); if ($data) { $this->result->mergeData($data); } return false; }