Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
functional
tests
app
Magento
BundleImportExport
Test
Constraint
AssertImportedBundleProducts.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\BundleImportExport\Test\Constraint
;
8
9
use
Magento\CatalogImportExport\Test\Constraint\AssertImportedProducts
;
10
use Magento\Mtf\Fixture\FixtureInterface;
11
15
class
AssertImportedBundleProducts
extends
AssertImportedProducts
16
{
22
protected
$productType
=
'bundle'
;
23
29
protected
$neededKeys
= [
30
'sku'
,
31
'name'
,
32
'associated_skus'
,
33
'bundle_values'
,
34
'url_key'
,
35
];
36
43
protected
function
getDisplayedProductData
(FixtureInterface
$product
)
44
{
45
$productData
= $this->
getDisplayedOnProductPageData
($product);
46
$bundleSelection =
$productData
[
'bundle_selections'
][0];
47
$assignedProduct = $bundleSelection[
'assigned_products'
][0];
48
49
$form = $this->catalogProductEdit->getProductForm();
50
$form->openSection(
'bundle'
);
51
$attributeSku = $form->getSection(
'bundle'
)->getAttributeSku();
52
53
$productData
[
'associated_skus'
] = $attributeSku;
54
$productType
= (
$productData
[
'price_type'
] ===
'Yes'
)
55
?
'dynamic'
56
:
'fixed'
;
57
$productData
[
'bundle_values'
] =
'name='
. $bundleSelection[
'title'
] .
',type=select,required=1,sku='
58
. $attributeSku .
',price=0.0000,default=0,default_qty='
59
. $assignedProduct[
'selection_qty'
] .
'.0000,price_type='
.
$productType
;
60
61
return
$this->
getResultProductsData
(
$productData
);
62
}
63
69
public
function
toString
()
70
{
71
return
'Products data from CSV import file and data from product edit page are correct and match.'
;
72
}
73
}
Magento\BundleImportExport\Test\Constraint
Definition:
AssertImportedBundleProducts.php:7
Magento\CatalogImportExport\Test\Constraint\AssertImportedProducts
Definition:
AssertImportedProducts.php:19
Magento\BundleImportExport\Test\Constraint\AssertImportedBundleProducts\$productType
$productType
Definition:
AssertImportedBundleProducts.php:22
Magento\BundleImportExport\Test\Constraint\AssertImportedBundleProducts
Definition:
AssertImportedBundleProducts.php:15
Magento\CatalogImportExport\Test\Constraint\AssertImportedProducts\getResultProductsData
getResultProductsData(array $productsData)
Definition:
AssertImportedProducts.php:168
Magento\CatalogImportExport\Test\Constraint\AssertImportedProducts\getDisplayedOnProductPageData
getDisplayedOnProductPageData(FixtureInterface $product)
Definition:
AssertImportedProducts.php:122
Magento\BundleImportExport\Test\Constraint\AssertImportedBundleProducts\toString
toString()
Definition:
AssertImportedBundleProducts.php:69
$productData
$productData
Definition:
products_virtual.php:38
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\BundleImportExport\Test\Constraint\AssertImportedBundleProducts\$neededKeys
$neededKeys
Definition:
AssertImportedBundleProducts.php:29
Magento\BundleImportExport\Test\Constraint\AssertImportedBundleProducts\getDisplayedProductData
getDisplayedProductData(FixtureInterface $product)
Definition:
AssertImportedBundleProducts.php:43