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
Widget
Test
Constraint
AssertWidgetAbsentOnFrontendHome.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Widget\Test\Constraint
;
8
9
use Magento\Cms\Test\Page\CmsIndex;
10
use
Magento\Widget\Test\Fixture\Widget
;
11
use Magento\Mtf\Constraint\AbstractConstraint;
12
use
Magento\Mtf\Util\Command\Cli\Cache
;
13
17
class
AssertWidgetAbsentOnFrontendHome
extends
AbstractConstraint
18
{
28
public
function
processAssert
(
29
CmsIndex $cmsIndex,
30
Widget $widget,
31
Cache
$cache
,
32
array $caches = []
33
) {
34
// Flush cache
35
if
(!in_array(
'Invalidated'
, $caches)) {
36
$cache
->flush();
37
}
38
$cmsIndex->open();
39
$widgetText = $widget->getParameters()[
'anchor_text'
];
40
\PHPUnit\Framework\Assert::assertFalse(
41
$cmsIndex->getWidgetView()->isWidgetVisible($widget, $widgetText),
42
'Widget is present on Home page.'
43
);
44
}
45
52
public
function
toString
()
53
{
54
return
"Widget is absent on Home page."
;
55
}
56
}
Magento\Mtf\Util\Command\Cli\Cache
Definition:
Cache.php:14
Magento\Widget\Test\Constraint
Definition:
AssertProductInCatalogNewProductsList.php:7
$cache
$cache
Definition:
application_cache.php:8
Magento\Widget\Test\Constraint\AssertWidgetAbsentOnFrontendHome\toString
toString()
Definition:
AssertWidgetAbsentOnFrontendHome.php:52
Magento\Widget\Test\Fixture\Widget
Definition:
Parameters.php:7
Magento\Widget\Test\Constraint\AssertWidgetAbsentOnFrontendHome\processAssert
processAssert(CmsIndex $cmsIndex, Widget $widget, Cache $cache, array $caches=[])
Definition:
AssertWidgetAbsentOnFrontendHome.php:28
Magento\Widget\Test\Constraint\AssertWidgetAbsentOnFrontendHome
Definition:
AssertWidgetAbsentOnFrontendHome.php:17