File tree Expand file tree Collapse file tree 1 file changed +20
-18
lines changed
dev/tests/integration/testsuite/Magento/PageBuilder/_files/product_totals Expand file tree Collapse file tree 1 file changed +20
-18
lines changed Original file line number Diff line number Diff line change @@ -265,21 +265,23 @@ function (Product $product) {
265
265
);
266
266
267
267
// Create a gift card product
268
- createTestProduct (
269
- 'Simple Gift Card ' ,
270
- 'gift-card ' ,
271
- function (Product $ product ) {
272
- $ product ->setPrice (10 );
273
- $ product ->setTypeId (\Magento \GiftCard \Model \Catalog \Product \Type \Giftcard::TYPE_GIFTCARD );
274
- $ product ->setStockData (['use_config_manage_stock ' => 0 ]);
275
- $ product ->setCanSaveCustomOptions (true );
276
- $ product ->setHasOptions (true );
277
- $ product ->setAllowOpenAmount (1 );
278
- $ product ->setGiftcardType (\Magento \GiftCard \Model \Giftcard::TYPE_VIRTUAL );
279
- return $ product ;
280
- },
281
- $ objectManager ,
282
- $ defaultAttributeSet ,
283
- $ categoryLinkManagement ,
284
- $ productRepository
285
- );
268
+ if (class_exists ('Magento\GiftCard\Model\Giftcard ' )) {
269
+ createTestProduct (
270
+ 'Simple Gift Card ' ,
271
+ 'gift-card ' ,
272
+ function (Product $ product ) {
273
+ $ product ->setPrice (10 );
274
+ $ product ->setTypeId (\Magento \GiftCard \Model \Catalog \Product \Type \Giftcard::TYPE_GIFTCARD );
275
+ $ product ->setStockData (['use_config_manage_stock ' => 0 ]);
276
+ $ product ->setCanSaveCustomOptions (true );
277
+ $ product ->setHasOptions (true );
278
+ $ product ->setAllowOpenAmount (1 );
279
+ $ product ->setGiftcardType (\Magento \GiftCard \Model \Giftcard::TYPE_VIRTUAL );
280
+ return $ product ;
281
+ },
282
+ $ objectManager ,
283
+ $ defaultAttributeSet ,
284
+ $ categoryLinkManagement ,
285
+ $ productRepository
286
+ );
287
+ }
You can’t perform that action at this time.
0 commit comments