Pantheon\Terminus\UnitTests\Models\WorkflowOperationTest::testSerialize PHP Method

testSerialize() public method

public testSerialize ( )
    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());
    }