serialize() public method

Formats operation object into an associative array for output
public serialize ( ) : array
return array
 public function testSerialize()
 {
     $data = ['id' => '123', 'description' => 'Dumbo Drop', 'run_time' => 1.2345, 'type' => 'platform', 'result' => 'success', 'log_output' => 'The operation was a total success', 'other' => 'something else'];
     $wfop = new WorkflowOperation((object) $data);
     $data['duration'] = '1s';
     unset($data['other']);
     unset($data['run_time']);
     $this->assertEquals($data, $wfop->serialize());
 }