@@ -216,9 +216,6 @@ protected function setUp()
216
216
false
217
217
);
218
218
$ this ->resourceModelMock = $ this ->getMock ('\Magento\Catalog\Model\Resource\Product ' , [], [], '' , false );
219
- $ this ->eavConfigMock = $ this ->getMock ('Magento\Eav\Model\Config ' , [], [], '' , false );
220
- $ this ->eavConfigMock ->expects ($ this ->any ())->method ('getEntityType ' )
221
- ->willReturn (new \Magento \Framework \Object (['default_attribute_set_id ' => 4 ]));
222
219
$ this ->objectManager = new ObjectManager ($ this );
223
220
$ this ->extensibleDataObjectConverterMock = $ this
224
221
->getMockBuilder ('\Magento\Framework\Api\ExtensibleDataObjectConverter ' )
@@ -229,7 +226,13 @@ protected function setUp()
229
226
->disableOriginalConstructor ()->getMock ();
230
227
$ this ->mimeTypeExtensionMapMock =
231
228
$ this ->getMockBuilder ('Magento\Catalog\Model\Product\Gallery\MimeTypeExtensionMap ' )->getMock ();
232
- $ this ->contentFactoryMock = $ this ->getMock ('Magento\Framework\Api\Data\ImageContentInterfaceFactory ' , ['create ' ], [], '' , false );
229
+ $ this ->contentFactoryMock = $ this ->getMock (
230
+ 'Magento\Framework\Api\Data\ImageContentInterfaceFactory ' ,
231
+ ['create ' ],
232
+ [],
233
+ '' ,
234
+ false
235
+ );
233
236
$ this ->contentValidatorMock = $ this ->getMockBuilder ('Magento\Framework\Api\ImageContentValidatorInterface ' )
234
237
->disableOriginalConstructor ()
235
238
->getMock ();
@@ -271,7 +274,6 @@ protected function setUp()
271
274
'searchResultsFactory ' => $ this ->searchResultsFactoryMock ,
272
275
'extensibleDataObjectConverter ' => $ this ->extensibleDataObjectConverterMock ,
273
276
'optionConverter ' => $ optionConverter ,
274
- 'eavConfig ' => $ this ->eavConfigMock ,
275
277
'contentValidator ' => $ this ->contentValidatorMock ,
276
278
'fileSystem ' => $ this ->fileSystemMock ,
277
279
'contentFactory ' => $ this ->contentFactoryMock ,
@@ -595,8 +597,6 @@ public function testGetList()
595
597
$ searchCriteriaMock = $ this ->getMock ('\Magento\Framework\Api\SearchCriteriaInterface ' , [], [], '' , false );
596
598
$ attributeCode = 'attribute_code ' ;
597
599
$ collectionMock = $ this ->getMock ('\Magento\Catalog\Model\Resource\Product\Collection ' , [], [], '' , false );
598
- $ filterMock = $ this ->getMock ('\Magento\Framework\Api\Filter ' , [], [], '' , false );
599
- $ searchCriteriaBuilderMock = $ this ->getMock ('\Magento\Framework\Api\SearchCriteriaBuilder ' , [], [], '' , false );
600
600
$ extendedSearchCriteriaMock = $ this ->getMock ('\Magento\Framework\Api\SearchCriteria ' , [], [], '' , false );
601
601
$ productAttributeSearchResultsMock = $ this ->getMockForAbstractClass (
602
602
'\Magento\Catalog\Api\Data\ProductAttributeInterface ' ,
@@ -620,15 +620,8 @@ public function testGetList()
620
620
$ itemsMock = $ this ->getMock ('\Magento\Framework\Object ' , [], [], '' , false );
621
621
622
622
$ this ->collectionFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ collectionMock );
623
- $ this ->filterBuilderMock ->expects ($ this ->any ())->method ('setField ' )->with ('attribute_set_id ' )
624
- ->will ($ this ->returnSelf ());
625
- $ this ->filterBuilderMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ filterMock );
626
- $ this ->filterBuilderMock ->expects ($ this ->once ())->method ('setValue ' )
627
- ->with (4 )
628
- ->willReturn ($ this ->filterBuilderMock );
629
- $ this ->searchCriteriaBuilderMock ->expects ($ this ->once ())->method ('addFilters ' )->with ([$ filterMock ])
630
- ->willReturn ($ searchCriteriaBuilderMock );
631
- $ searchCriteriaBuilderMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ extendedSearchCriteriaMock );
623
+ $ this ->searchCriteriaBuilderMock ->expects ($ this ->once ())->method ('create ' )
624
+ ->willReturn ($ extendedSearchCriteriaMock );
632
625
$ this ->metadataServiceMock ->expects ($ this ->once ())->method ('getList ' )->with ($ extendedSearchCriteriaMock )
633
626
->willReturn ($ productAttributeSearchResultsMock );
634
627
$ productAttributeSearchResultsMock ->expects ($ this ->once ())->method ('getItems ' )
0 commit comments