@@ -66,17 +66,17 @@ protected function tearDown()
66
66
*/
67
67
public function testCoreAttributes ($ storeId , $ productData , $ expectedHasSpecialPrice )
68
68
{
69
- $ extensionAttributesStub = $ this ->getMockBuilder (ProductExtensionInterface ::class)
70
- ->setMethods (['getSolrBoost ' ])
69
+ $ customAttributeStub = $ this ->getMockBuilder (\ Magento \ Framework \ Api \AttributeInterface ::class)
70
+ ->setMethods (['getValue ' ])
71
71
->getMockForAbstractClass ();
72
72
73
73
$ this ->magentoProductStub ->method ('getId ' )->willReturn ($ productData ['id ' ]);
74
74
$ this ->magentoProductStub ->method ('getPrice ' )->willReturn ($ productData ['price ' ]);
75
75
$ finalPrice = isset ($ productData ['special_price ' ]) ? $ productData ['special_price ' ] : $ productData ['price ' ];
76
76
$ this ->magentoProductStub ->method ('getFinalPrice ' )->willReturn ($ finalPrice );
77
77
$ this ->magentoProductStub ->method ('getStoreId ' )->willReturn ($ storeId );
78
- $ this ->magentoProductStub ->method ('getExtensionAttributes ' )->willReturn ($ extensionAttributesStub );
79
- $ extensionAttributesStub ->method ('getSolrBoost ' )->willReturn ($ productData ['solr_boost ' ]);
78
+ $ this ->magentoProductStub ->method ('getCustomAttribute ' )->willReturn ($ customAttributeStub );
79
+ $ customAttributeStub ->method ('getValue ' )->willReturn ($ productData ['solr_boost ' ]);
80
80
$ this ->magentoProductStub ->method ('getCategoryIds ' )->willReturn ($ productData ['category_ids ' ]);
81
81
$ productBridge = $ this ->makeProductBridge ($ storeId );
82
82
@@ -176,16 +176,16 @@ public function testIndexable($storeAndWebsiteId, $status, $visibility, $website
176
176
->getMockForAbstractClass ();
177
177
$ storeStub ->method ('getWebsiteId ' )->willReturn ($ storeAndWebsiteId );
178
178
179
- $ extensionAttributesStub = $ this ->getMockBuilder (ProductExtensionInterface ::class)
180
- ->setMethods (['getStockItem ' , ' getSolrExclude ' ])
179
+ $ customAttributeStub = $ this ->getMockBuilder (\ Magento \ Framework \ Api \AttributeInterface ::class)
180
+ ->setMethods (['getValue ' ])
181
181
->getMockForAbstractClass ();
182
- $ extensionAttributesStub ->method ('getSolrExclude ' )->willReturn ($ solrExclude );
182
+ $ customAttributeStub ->method ('getValue ' )->willReturn ($ solrExclude );
183
183
184
184
$ this ->magentoProductStub ->method ('getStatus ' )->willReturn ($ status );
185
185
$ this ->magentoProductStub ->method ('getVisibility ' )->willReturn ($ visibility );
186
186
$ this ->magentoProductStub ->method ('getStore ' )->willReturn ($ storeStub );
187
187
$ this ->magentoProductStub ->method ('getWebsiteIds ' )->willReturn ($ websiteIds );
188
- $ this ->magentoProductStub ->method ('getExtensionAttributes ' )->willReturn ($ extensionAttributesStub );
188
+ $ this ->magentoProductStub ->method ('getCustomAttribute ' )->willReturn ($ customAttributeStub );
189
189
$ this ->magentoProductStub ->method ('getData ' )->with ('is_salable ' )->willReturn ($ inStock );
190
190
191
191
$ productBridge = $ this ->makeProductBridge ($ storeAndWebsiteId );
0 commit comments