File tree Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -158,8 +158,24 @@ public function __construct(
158
158
$ this ->validatorPool = $ validatorPool ;
159
159
$ this ->customOptionValuesFactory = $ customOptionValuesFactory ?:
160
160
\Magento \Framework \App \ObjectManager::getInstance ()->get (ProductCustomOptionValuesInterfaceFactory::class);
161
- $ this ->optionGroups = $ optionGroups ;
162
- $ this ->optionGroupsToTypes = $ optionGroupsToTypes ;
161
+ $ this ->optionGroups = $ optionGroups ?: [
162
+ 'date ' => 'Magento\Catalog\Model\Product\Option\Type\Date ' ,
163
+ 'file ' => 'Magento\Catalog\Model\Product\Option\Type\File ' ,
164
+ 'select ' => 'Magento\Catalog\Model\Product\Option\Type\Select ' ,
165
+ 'text ' => 'Magento\Catalog\Model\Product\Option\Type\Text ' ,
166
+ ];
167
+ $ this ->optionGroupsToTypes = $ optionGroupsToTypes ?: [
168
+ 'field ' => 'text ' ,
169
+ 'area ' => 'text ' ,
170
+ 'file ' => 'file ' ,
171
+ 'drop_down ' => 'select ' ,
172
+ 'radio ' => 'select ' ,
173
+ 'checkbox ' => 'select ' ,
174
+ 'multiple ' => 'select ' ,
175
+ 'date ' => 'date ' ,
176
+ 'date_time ' => 'date ' ,
177
+ 'time ' => 'date ' ,
178
+ ];
163
179
164
180
parent ::__construct (
165
181
$ context ,
Original file line number Diff line number Diff line change @@ -24,16 +24,7 @@ protected function setUp()
24
24
{
25
25
$ this ->productMock = $ this ->createMock (\Magento \Catalog \Model \Product::class);
26
26
$ objectManager = new ObjectManager ($ this );
27
- $ this ->model = $ objectManager ->getObject (
28
- \Magento \Catalog \Model \Product \Option::class,
29
- [
30
- 'optionGroupsToTypes ' => [
31
- 'field ' => 'text ' ,
32
- 'drop_down ' => 'select ' ,
33
- 'file ' => 'file ' ,
34
- ]
35
- ]
36
- );
27
+ $ this ->model = $ objectManager ->getObject (\Magento \Catalog \Model \Product \Option::class);
37
28
$ this ->model ->setProduct ($ this ->productMock );
38
29
}
39
30
Original file line number Diff line number Diff line change 72
72
<preference for =" Magento\Catalog\Model\Indexer\Product\Price\UpdateIndexInterface" type =" Magento\Catalog\Model\Indexer\Product\Price\InvalidateIndex" />
73
73
<preference for =" Magento\Catalog\Model\Product\Gallery\ImagesConfigFactoryInterface" type =" Magento\Catalog\Model\Product\Gallery\ImagesConfigFactory" />
74
74
<preference for =" Magento\Catalog\Model\Product\Configuration\Item\ItemResolverInterface" type =" Magento\Catalog\Model\Product\Configuration\Item\ItemResolverComposite" />
75
+ <preference for =" Magento\Catalog\Api\Data\MassActionInterface" type =" \Magento\Catalog\Model\MassAction" />
75
76
<type name =" Magento\Customer\Model\ResourceModel\Visitor" >
76
77
<plugin name =" catalogLog" type =" Magento\Catalog\Model\Plugin\Log" />
77
78
</type >
You can’t perform that action at this time.
0 commit comments