File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed
app/code/Magento/ConfigurableProduct Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 14
14
use Magento \Catalog \Api \ProductAttributeRepositoryInterface ;
15
15
use Magento \ConfigurableProduct \Model \Product \Type \Configurable ;
16
16
17
- /**
18
- * Class ProductRepositorySave
19
- */
20
17
class ProductRepositorySave
21
18
{
22
19
/**
Original file line number Diff line number Diff line change 14
14
use Magento \ConfigurableProduct \Model \Plugin \ProductRepositorySave ;
15
15
use Magento \ConfigurableProduct \Model \Product \Type \Configurable ;
16
16
use Magento \ConfigurableProduct \Test \Unit \Model \Product \ProductExtensionAttributes ;
17
+ use Magento \Framework \TestFramework \Unit \Helper \ObjectManager ;
17
18
use PHPUnit_Framework_MockObject_MockObject as MockObject ;
18
19
19
20
/**
@@ -97,9 +98,12 @@ protected function setUp()
97
98
98
99
$ this ->option = $ this ->getMockForAbstractClass (OptionInterface::class);
99
100
100
- $ this ->plugin = new ProductRepositorySave (
101
- $ this ->productAttributeRepository ,
102
- $ this ->productFactory
101
+ $ this ->plugin = (new ObjectManager ($ this ))->getObject (
102
+ ProductRepositorySave::class,
103
+ [
104
+ 'productAttributeRepository ' => $ this ->productAttributeRepository ,
105
+ 'productFactory ' => $ this ->productFactory
106
+ ]
103
107
);
104
108
}
105
109
Original file line number Diff line number Diff line change 59
59
</arguments >
60
60
</type >
61
61
<type name =" Magento\Catalog\Api\ProductRepositoryInterface" >
62
- <plugin name =" configurableProductSaveOptions" sortOrder =" 10" type =" \ Magento\ConfigurableProduct\Model\Plugin\ProductRepositorySave" />
62
+ <plugin name =" configurableProductSaveOptions" sortOrder =" 10" type =" Magento\ConfigurableProduct\Model\Plugin\ProductRepositorySave" />
63
63
</type >
64
64
<type name =" Magento\Catalog\Model\Product" >
65
65
<plugin name =" configurable_identity" type =" Magento\ConfigurableProduct\Plugin\Model\Product" />
You can’t perform that action at this time.
0 commit comments