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
Reports
Test
Constraint
AssertBestsellerReportResult.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Reports\Test\Constraint
;
8
9
use
Magento\Catalog\Test\Fixture\CatalogProductSimple
;
10
use Magento\Reports\Test\Page\Adminhtml\Bestsellers;
11
use
Magento\Sales\Test\Fixture\OrderInjectable
;
12
use Magento\Mtf\Constraint\AbstractConstraint;
13
17
class
AssertBestsellerReportResult
extends
AbstractConstraint
18
{
27
public
function
processAssert(Bestsellers $bestsellers, OrderInjectable
$order
, $date)
28
{
30
$product
=
$order
->getEntityId()[
'products'
][0];
31
32
$filter = [
33
'date'
=> date($date),
34
'product'
=>
$product
->getName(),
35
'price'
=>
$product
->getPrice(),
36
'orders'
=>
$product
->getCheckoutData()[
'qty'
],
37
];
38
39
\PHPUnit\Framework\Assert::assertTrue(
40
$bestsellers->getGridBlock()->isRowVisible($filter,
false
),
41
'Bestseller does not present in report grid.'
42
);
43
}
44
50
public
function
toString
()
51
{
52
return
'Bestseller total result is equals to data from dataset.'
;
53
}
54
}
$order
$order
Definition:
order.php:55
Magento\Reports\Test\Constraint\AssertBestsellerReportResult
Definition:
AssertBestsellerReportResult.php:17
Magento\Catalog\Test\Fixture\CatalogProductSimple
Definition:
CustomAttribute.php:7
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Sales\Test\Fixture\OrderInjectable
Definition:
BillingAddressId.php:7
Magento\Reports\Test\Constraint
Definition:
AbstractAssertCustomerOrderReportResult.php:7
Magento\Reports\Test\Constraint\AssertBestsellerReportResult\toString
toString()
Definition:
AssertBestsellerReportResult.php:50