Skip to content

Commit ec78c37

Browse files
committed
AC-15674: Varnish 7.3 (latest version)- Sub Categories links / options of Default category are not getting displayed on Store front Home page
Fix for Integration test failure
1 parent 4ce9949 commit ec78c37

File tree

1 file changed

+14
-8
lines changed
  • dev/tests/integration/testsuite/Magento/PageCache/Model/Layout

1 file changed

+14
-8
lines changed

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

Lines changed: 14 additions & 8 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('Handle \'default\' must not contain blocks with \'ttl\' attribute specified');
18+
$this->expectExceptionMessage('must not contain blocks with \'ttl\' attribute specified');
1919

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

@@ -30,19 +30,25 @@ public function testLoadEntitySpecificHandleWithEsiBlock()
3030
/** @var EntitySpecificHandlesList $entitySpecificHandleList */
3131
$entitySpecificHandleList = $objectManager->get(EntitySpecificHandlesList::class);
3232

33-
// Register test layout file with ttl attribute
34-
$testHandle = 'test_layout_with_ttl';
33+
// Register test layout with ttl attribute
34+
$testHandle = 'test_entity_specific_handle';
3535

3636
// Add this handle to entity-specific list to trigger validation
3737
$entitySpecificHandleList->addHandle($testHandle);
3838

39-
// Manually add the layout XML from test fixture
40-
$layoutXml = file_get_contents(__DIR__ . '/../../_files/test_layout_with_ttl.xml');
39+
// Layout XML with ttl attribute (without XML declaration to avoid parsing issues)
40+
$layoutXml = <<<XML
41+
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
42+
<body>
43+
<block class="Magento\Framework\View\Element\Template" name="test.block.with.ttl" template="Magento_Theme::html/notices.phtml" ttl="3600"/>
44+
</body>
45+
</page>
46+
XML;
47+
4148
$layoutMerge->addUpdate($layoutXml);
4249

43-
// This throws exception when loading
44-
// because test_layout_with_ttl is marked as entity-specific
45-
// and contains a block with ttl
50+
// This should throw exception when loading because test_entity_specific_handle
51+
// is marked as entity-specific and contains a block with ttl
4652
$layoutMerge->load([$testHandle]);
4753
}
4854
}

0 commit comments

Comments
 (0)