26 $this->processor = $this->getMockBuilder(\
Magento\Framework\Reflection\DataObjectProcessor::class)
27 ->disableOriginalConstructor()
30 $this->dataObject = $this->getMockBuilder(\
Magento\Framework\Api\ExtensibleDataInterface::class)
35 \
Magento\Framework\Api\ExtensibleDataObjectConverter::class,
37 'dataObjectProcessor' => $this->processor,
48 'attribute_key' =>
'attribute_value',
51 $this->processor->expects($this->any())
52 ->method(
'buildOutputDataArray')
53 ->with($this->dataObject)
54 ->willReturn($dataArray);
58 $this->converter->toNestedArray($this->dataObject)
68 'attribute_key' =>
'attribute_value',
77 'custom_attribute_value_multi_1',
78 'custom_attribute_value_multi_2',
89 'attribute_key' =>
'attribute_value',
90 'custom_attribute_code' =>
'custom_attribute_value',
91 'custom_attribute_code_multi' => [
92 'custom_attribute_value_multi_1',
93 'custom_attribute_value_multi_2',
97 $this->processor->expects($this->any())
98 ->method(
'buildOutputDataArray')
99 ->with($this->dataObject)
100 ->willReturn($dataArray);
104 $this->converter->toNestedArray($this->dataObject, [
'custom_attribute_code_skip'])
const CUSTOM_ATTRIBUTES_KEY
testToNestedArrayCustom()