Skip to content

Commit 6de0f1e

Browse files
Merge branch '2.4-develop' into ACQE-functional-deployment-v4-4
2 parents bc66280 + 9a62604 commit 6de0f1e

File tree

2 files changed

+7
-12
lines changed
  • app/code/Magento/Theme/view/frontend/layout
  • dev/tests/integration/testsuite/Magento/PageCache/Model/Layout

2 files changed

+7
-12
lines changed

app/code/Magento/Theme/view/frontend/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
<arguments>
7474
<argument name="title" translate="true" xsi:type="string">Menu</argument>
7575
</arguments>
76-
<block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="Magento_Theme::html/topmenu.phtml" before="-"/>
76+
<block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="Magento_Theme::html/topmenu.phtml" ttl="3600" before="-"/>
7777
</block>
7878
<block class="Magento\Framework\View\Element\Text" name="store.links" group="navigation-sections">
7979
<arguments>

dev/tests/integration/testsuite/Magento/PageCache/Model/Layout/MergeTest.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class MergeTest extends \PHPUnit\Framework\TestCase
1515
public function testLoadEntitySpecificHandleWithEsiBlock()
1616
{
1717
$this->expectException(\LogicException::class);
18-
$this->expectExceptionMessage('must not contain blocks with \'ttl\' attribute specified');
18+
$this->expectExceptionMessage('Handle \'default\' must not contain blocks with \'ttl\' attribute specified');
1919

2020
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
2121

@@ -29,15 +29,10 @@ public function testLoadEntitySpecificHandleWithEsiBlock()
2929

3030
/** @var EntitySpecificHandlesList $entitySpecificHandleList */
3131
$entitySpecificHandleList = $objectManager->get(EntitySpecificHandlesList::class);
32-
33-
// Register test handle as entity-specific
34-
$testHandle = 'default';
35-
$entitySpecificHandleList->addHandle($testHandle);
36-
37-
// Simple XML with ttl attribute that should trigger the validation
38-
$layoutXml = '<block class="Magento\Framework\View\Element\Template" name="test.block" ttl="3600"/>';
39-
40-
// This should throw exception because the handle is entity-specific and contains ttl
41-
$layoutMerge->validateUpdate($testHandle, $layoutXml);
32+
// Add 'default' handle, which has declarations of blocks with ttl, to the list of entity specific handles.
33+
// This allows to simulate a situation, when block with ttl attribute
34+
// is declared e.g. in 'catalog_product_view_id_1' handle
35+
$entitySpecificHandleList->addHandle('default');
36+
$layoutMerge->load(['default']);
4237
}
4338
}

0 commit comments

Comments
 (0)