示例#1
0
 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']));
 }
示例#2
0
 /**
  * Add data to result object
  *
  * @param string $key
  * @param mixed  $val
  */
 public function addData($key, $val)
 {
     $this->result->addData($key, $val);
 }