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
PageCache
Test
Constraint
AssertCacheIsRefreshableAndInvalidated.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\PageCache\Test\Constraint
;
8
9
use Magento\Mtf\Constraint\AbstractConstraint;
10
use Magento\PageCache\Test\Page\Adminhtml\AdminCache;
11
15
class
AssertCacheIsRefreshableAndInvalidated
extends
AbstractConstraint
16
{
20
const
SUCCESS_MESSAGE
=
'%d cache type(s) refreshed.'
;
21
29
public
function
processAssert
(AdminCache $adminCache, $cacheTags)
30
{
31
$items
= [];
32
foreach
($cacheTags as $cacheTag) {
33
$items
[] = [
34
'tags'
=> $cacheTag,
35
'status'
=>
'Invalidated'
36
];
37
}
38
39
$adminCache->open();
40
$adminCache->getGridBlock()->massaction(
$items
,
'Refresh'
);
41
42
\PHPUnit\Framework\Assert::assertEquals(
43
sprintf(self::SUCCESS_MESSAGE, count(
$items
)),
44
$adminCache->getMessagesBlock()->getSuccessMessage(),
45
'Cache is Invalid and refreshable.'
46
);
47
}
48
54
public
function
toString
()
55
{
56
return
'Cache is not Invalid or not refreshable.'
;
57
}
58
}
Magento\PageCache\Test\Constraint\AssertCacheIsRefreshableAndInvalidated\processAssert
processAssert(AdminCache $adminCache, $cacheTags)
Definition:
AssertCacheIsRefreshableAndInvalidated.php:29
Magento\PageCache\Test\Constraint\AssertCacheIsRefreshableAndInvalidated
Definition:
AssertCacheIsRefreshableAndInvalidated.php:15
Magento\PageCache\Test\Constraint\AssertCacheIsRefreshableAndInvalidated\SUCCESS_MESSAGE
const SUCCESS_MESSAGE
Definition:
AssertCacheIsRefreshableAndInvalidated.php:20
Magento\PageCache\Test\Constraint
Definition:
AssertCacheFlushSuccessMessage.php:7
Magento\PageCache\Test\Constraint\AssertCacheIsRefreshableAndInvalidated\toString
toString()
Definition:
AssertCacheIsRefreshableAndInvalidated.php:54
$items
$items
Definition:
order_rollback.php:21