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
Sales
Test
TestStep
Utils
CompareQtyTrait.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Sales\Test\TestStep\Utils
;
8
9
use Magento\Mtf\Fixture\FixtureInterface;
10
14
trait CompareQtyTrait
15
{
23
protected
function
compare(array
$products
, array
$data
)
24
{
25
if
(empty(
$data
[
'items_data'
])) {
26
return
false
;
27
}
28
29
$count
= 0;
30
foreach
(
$data
[
'items_data'
] as $key =>
$item
) {
31
if
(!isset(
$products
[$key])) {
32
continue
;
33
}
34
35
if
(
$products
[$key]->getData(
'qty'
) !==
$item
[
'qty'
]) {
36
++
$count
;
37
}
38
}
39
40
return
$count
!== 0;
41
}
42
}
$count
$count
Definition:
recent.phtml:13
$products
$products
Definition:
products_for_search.php:14
$item
$item
Definition:
partial_invoice.php:27
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Sales\Test\TestStep\Utils
Definition:
CompareQtyTrait.php:7