@@ -59,17 +59,17 @@ protected function setUp()
59
59
{
60
60
$ this ->objectManagerHelper = new ObjectManagerHelper ($ this );
61
61
$ this ->rowCustomizerMock = $ this ->objectManagerHelper ->getObject (
62
- ' \Magento\BundleImportExport\Model\Export\RowCustomizer '
62
+ \Magento \BundleImportExport \Model \Export \RowCustomizer::class
63
63
);
64
64
$ this ->productResourceCollection = $ this ->getMock (
65
- ' \Magento\Catalog\Model\ResourceModel\Product\Collection ' ,
65
+ \Magento \Catalog \Model \ResourceModel \Product \Collection::class ,
66
66
['addAttributeToFilter ' , 'getIterator ' ],
67
67
[],
68
68
'' ,
69
69
false
70
70
);
71
71
$ this ->product = $ this ->getMock (
72
- ' \Magento\Catalog\Model\Product ' ,
72
+ \Magento \Catalog \Model \Product::class ,
73
73
[
74
74
'getId ' ,
75
75
'getPriceType ' ,
@@ -91,7 +91,7 @@ protected function setUp()
91
91
$ this ->product ->expects ($ this ->any ())->method ('getWeightType ' )->willReturn (1 );
92
92
$ this ->product ->expects ($ this ->any ())->method ('getTypeInstance ' )->willReturnSelf ();
93
93
$ this ->optionsCollection = $ this ->getMock (
94
- ' \Magento\Bundle\Model\ResourceModel\Option\Collection ' ,
94
+ \Magento \Bundle \Model \ResourceModel \Option \Collection::class ,
95
95
['setOrder ' , 'getIterator ' ],
96
96
[],
97
97
'' ,
@@ -100,7 +100,7 @@ protected function setUp()
100
100
$ this ->product ->expects ($ this ->any ())->method ('getOptionsCollection ' )->willReturn ($ this ->optionsCollection );
101
101
$ this ->optionsCollection ->expects ($ this ->any ())->method ('setOrder ' )->willReturnSelf ();
102
102
$ this ->option = $ this ->getMock (
103
- ' \Magento\Bundle\Model\Option ' ,
103
+ \Magento \Bundle \Model \Option::class ,
104
104
['getId ' , 'getTitle ' , 'getType ' , 'getRequired ' ],
105
105
[],
106
106
'' ,
@@ -114,7 +114,7 @@ protected function setUp()
114
114
$ this ->returnValue (new \ArrayIterator ([$ this ->option ]))
115
115
);
116
116
$ this ->selection = $ this ->getMock (
117
- ' \Magento\Catalog\Model\Product ' ,
117
+ \Magento \Catalog \Model \Product::class ,
118
118
['getSku ' , 'getSelectionPriceValue ' , 'getIsDefault ' , 'getSelectionQty ' , 'getSelectionPriceType ' ],
119
119
[],
120
120
'' ,
@@ -125,7 +125,7 @@ protected function setUp()
125
125
$ this ->selection ->expects ($ this ->any ())->method ('getSelectionQty ' )->willReturn (1 );
126
126
$ this ->selection ->expects ($ this ->any ())->method ('getSelectionPriceType ' )->willReturn (1 );
127
127
$ this ->selectionsCollection = $ this ->getMock (
128
- ' \Magento\Bundle\Model\ResourceModel\Selection\Collection ' ,
128
+ \Magento \Bundle \Model \ResourceModel \Selection \Collection::class ,
129
129
['getIterator ' , 'addAttributeToSort ' ],
130
130
[],
131
131
'' ,
@@ -175,14 +175,16 @@ public function testAddHeaderColumns()
175
175
public function testAddData ()
176
176
{
177
177
$ preparedData = $ this ->rowCustomizerMock ->prepareData ($ this ->productResourceCollection , [1 ]);
178
+ $ attributes = 'attribute=1,sku_type=1,attribute2="Text",price_type=1,price_view=1,weight_type=1, '
179
+ . 'values=values,shipment_type=1,attribute3=One,Two,Three ' ;
178
180
$ dataRow = [
179
181
'sku ' => 'sku1 ' ,
180
- 'additional_attributes ' => ' attribute=1,sku_type=1,price_type=1,price_view=1,weight_type=1,values=values '
182
+ 'additional_attributes ' => $ attributes
181
183
];
182
184
$ preparedRow = $ preparedData ->addData ($ dataRow , 1 );
183
185
$ expected = [
184
186
'sku ' => 'sku1 ' ,
185
- 'additional_attributes ' => 'attribute=1 ' ,
187
+ 'additional_attributes ' => 'attribute=1,attribute2="Text",attribute3=One,Two,Three ' ,
186
188
'bundle_price_type ' => 'fixed ' ,
187
189
'bundle_sku_type ' => 'fixed ' ,
188
190
'bundle_price_view ' => 'As low as ' ,
0 commit comments