public function testMergeDataObjects() { $data = $this->getData(); $itemExpected = $this->quoteDetailsItemBuilder->populateWithArray($data['dataMerged'])->create(); $itemSomeFields = $this->quoteDetailsItemBuilder->populateWithArray($data['data1'])->create(); $itemMoreFields = $this->quoteDetailsItemBuilder->populateWithArray($data['data2'])->create(); $itemMerged = $this->quoteDetailsItemBuilder->mergeDataObjects($itemSomeFields, $itemMoreFields); $this->assertEquals($itemExpected->__toArray(), $itemMerged->__toArray()); }