/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
dev/tests/integration/testsuite/Magento/PageCache/Model/Layout/MergeTest.php
38 строк
1 KB
Sumesh P
AC-15674: Varnish 7.3 (latest version)- Sub Categories links / options of Default category are not getting displayed on Store front Home page
04 ноя 2025, 16:39
04 ноя 2025, 16:39
8124cfe
Код
Авторство
О чём код?
<?php /** * Copyright 2016 Adobe * All Rights Reserved. */ namespace Magento\PageCache\Model\Layout; use Magento\Framework\View\EntitySpecificHandlesList; class MergeTest extends \PHPUnit\Framework\TestCase { /** * @magentoAppArea frontend */ public function testLoadEntitySpecificHandleWithEsiBlock() { $this->expectException(\LogicException::class); $this->expectExceptionMessage('Handle \'default\' must not contain blocks with \'ttl\' attribute specified'); $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); // Mock cache to avoid layout being read from existing cache $cacheMock = $this->createMock(\Magento\Framework\Cache\FrontendInterface::class); /** @var \Magento\Framework\View\Model\Layout\Merge $layoutMerge */ $layoutMerge = $objectManager->create( \Magento\Framework\View\Model\Layout\Merge::class, ['cache' => $cacheMock] ); /** @var EntitySpecificHandlesList $entitySpecificHandleList */ $entitySpecificHandleList = $objectManager->get(EntitySpecificHandlesList::class); // Add 'default' handle, which has declarations of blocks with ttl, to the list of entity specific handles. // This allows to simulate a situation, when block with ttl attribute // is declared e.g. in 'catalog_product_view_id_1' handle $entitySpecificHandleList->addHandle('default'); $layoutMerge->load(['default']); } }