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
Bundle
Test
Constraint
AssertBundleProductForm.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Bundle\Test\Constraint
;
8
9
use
Magento\Catalog\Test\Constraint\AssertProductForm
;
10
14
class
AssertBundleProductForm
extends
AssertProductForm
15
{
21
protected
$specialArray
= [
22
'special_from_date'
=> [
23
'type'
=>
'date'
,
24
],
25
'special_to_date'
=> [
26
'type'
=>
'date'
,
27
],
28
];
29
37
protected
function
prepareFixtureData
(array
$data
, array
$sortFields
= [])
38
{
39
$data
[
'bundle_selections'
] = $this->
prepareBundleOptions
(
40
$data[
'bundle_selections'
][
'bundle_options'
]
41
);
42
43
return
parent::prepareFixtureData(
$data
,
$sortFields
);
44
}
45
52
protected
function
prepareBundleOptions
(array $bundleSelections)
53
{
54
foreach
($bundleSelections as &
$item
) {
55
unset(
$item
[
'frontend_type'
]);
56
foreach
(
$item
[
'assigned_products'
] as &$selection) {
57
$selection[
'data'
][
'getProductName'
] = $selection[
'search_data'
][
'name'
];
58
$selection = $selection[
'data'
];
59
}
60
}
61
62
return
$bundleSelections;
63
}
64
}
Magento\Catalog\Test\Constraint\AssertProductForm
Definition:
AssertProductForm.php:17
Magento\Bundle\Test\Constraint\AssertBundleProductForm\prepareFixtureData
prepareFixtureData(array $data, array $sortFields=[])
Definition:
AssertBundleProductForm.php:37
Magento\Bundle\Test\Constraint\AssertBundleProductForm\prepareBundleOptions
prepareBundleOptions(array $bundleSelections)
Definition:
AssertBundleProductForm.php:52
$item
$item
Definition:
partial_invoice.php:27
Magento\Bundle\Test\Constraint
Definition:
AssertBundleInCategory.php:7
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Catalog\Test\Constraint\AssertProductForm\$sortFields
$sortFields
Definition:
AssertProductForm.php:34
Magento\Bundle\Test\Constraint\AssertBundleProductForm\$specialArray
$specialArray
Definition:
AssertBundleProductForm.php:21
Magento\Bundle\Test\Constraint\AssertBundleProductForm
Definition:
AssertBundleProductForm.php:14