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
AssertCategoryCaching.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\Catalog\Test\Fixture\Category
;
11
use
Magento\Catalog\Test\Constraint\AssertProductNotVisibleInCategory
;
12
use
Magento\Catalog\Test\Constraint\AssertProductInCategory
;
13
use Magento\Catalog\Test\Page\Category\CatalogCategoryView;
14
use Magento\Cms\Test\Page\CmsIndex;
15
use
Magento\Mtf\Util\Command\Cli\Cron
;
16
20
class
AssertCategoryCaching
extends
AbstractConstraint
21
{
33
public
function
processAssert
(
34
Category
$category
,
35
CatalogCategoryView $categoryView,
36
CmsIndex $cmsIndex,
37
AssertProductInCategory
$assertProduct,
38
AssertProductNotVisibleInCategory
$assertProductNotVisible,
39
Cron
$cron
40
) {
41
$products
=
$category
->getDataFieldConfig(
'category_products'
)[
'source'
]->getProducts();
42
foreach
(
$products
as
$product
) {
43
$assertProductNotVisible->
processAssert
($categoryView, $cmsIndex,
$product
,
$category
);
44
}
45
46
$cron->
run
();
47
$cron->
run
();
48
49
foreach
(
$products
as
$product
) {
50
$assertProduct->
processAssert
($categoryView, $cmsIndex,
$product
,
$category
);
51
}
52
}
53
59
public
function
toString
()
60
{
61
return
'Category products are visible after indexing.'
;
62
}
63
}
$category
$category
Definition:
catalog_category_with_slash.php:7
Magento\Mtf\Util\Command\Cli\Cron\run
run()
Definition:
Cron.php:26
Magento\Catalog\Test\Constraint\AssertProductNotVisibleInCategory
Definition:
AssertProductNotVisibleInCategory.php:18
$products
$products
Definition:
products_for_search.php:14
Magento\Catalog\Test\Fixture\Category
Definition:
CategoryProducts.php:7
Magento\PageCache\Test\Constraint\AssertCategoryCaching\toString
toString()
Definition:
AssertCategoryCaching.php:59
Magento\Catalog\Test\Constraint\AssertProductInCategory\processAssert
processAssert(CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, FixtureInterface $product, Category $category)
Definition:
AssertProductInCategory.php:29
Magento\Catalog\Test\Constraint\AssertProductNotVisibleInCategory\processAssert
processAssert(CatalogCategoryView $catalogCategoryView, CmsIndex $cmsIndex, FixtureInterface $product, Category $category=null)
Definition:
AssertProductNotVisibleInCategory.php:33
Magento\PageCache\Test\Constraint\AssertCategoryCaching\processAssert
processAssert(Category $category, CatalogCategoryView $categoryView, CmsIndex $cmsIndex, AssertProductInCategory $assertProduct, AssertProductNotVisibleInCategory $assertProductNotVisible, Cron $cron)
Definition:
AssertCategoryCaching.php:33
Magento\Mtf\Util\Command\Cli\Cron
Definition:
Cron.php:14
Magento\PageCache\Test\Constraint
Definition:
AssertCacheFlushSuccessMessage.php:7
$product
$product
Definition:
bundle_product_with_not_visible_children.php:22
Magento\Catalog\Test\Constraint\AssertProductInCategory
Definition:
AssertProductInCategory.php:18
Magento\PageCache\Test\Constraint\AssertCategoryCaching
Definition:
AssertCategoryCaching.php:20