File tree Expand file tree Collapse file tree 2 files changed +6
-29
lines changed
dev/tests/integration/testsuite/Magento/PageCache Expand file tree Collapse file tree 2 files changed +6
-29
lines changed Original file line number Diff line number Diff line change @@ -30,25 +30,14 @@ public function testLoadEntitySpecificHandleWithEsiBlock()
3030 /** @var EntitySpecificHandlesList $entitySpecificHandleList */
3131 $ entitySpecificHandleList = $ objectManager ->get (EntitySpecificHandlesList::class);
3232
33- // Register test layout with ttl attribute
34- $ testHandle = 'test_entity_specific_handle ' ;
35-
36- // Add this handle to entity-specific list to trigger validation
33+ // Register test handle as entity-specific
34+ $ testHandle = 'default ' ;
3735 $ entitySpecificHandleList ->addHandle ($ testHandle );
3836
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-
48- $ layoutMerge ->addUpdate ($ layoutXml );
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"/> ' ;
4939
50- // This should throw exception when loading because test_entity_specific_handle
51- // is marked as entity-specific and contains a block with ttl
52- $ layoutMerge ->load ([$ testHandle ]);
40+ // This should throw exception because the handle is entity-specific and contains ttl
41+ $ layoutMerge ->validateUpdate ($ testHandle , $ layoutXml );
5342 }
5443}
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments