diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/Layout/MergeTest.php b/dev/tests/integration/testsuite/Magento/Framework/View/Layout/MergeTest.php index 3ba43f7142e82..4a29c3e3f3de6 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/Layout/MergeTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/View/Layout/MergeTest.php @@ -273,7 +273,16 @@ public function testLoadCache() $handles = ['fixture_handle_one', 'fixture_handle_two']; $this->_model->load($handles); $this->assertEquals($handles, $this->_model->getHandles()); - $this->assertEquals(self::FIXTURE_LAYOUT_XML, $this->_model->asString()); + $expectedResult = << + + + + + + +XML; + $this->assertEquals($expectedResult, $this->_model->asString()); } public function testLoadDbApp() diff --git a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php index 5be878720620b..fbaec0950e4c3 100644 --- a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php +++ b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php @@ -428,9 +428,10 @@ public function load($handles = []) $cacheId = $this->getCacheId(); $cacheIdPageLayout = $cacheId . '_' . self::PAGE_LAYOUT_CACHE_SUFFIX; $result = $this->_loadCache($cacheId); - if ($result) { + $pageLayoutResult = $this->_loadCache($cacheIdPageLayout); + if ($result && $pageLayoutResult) { $this->addUpdate($result); - $this->pageLayout = $this->_loadCache($cacheIdPageLayout); + $this->pageLayout = $pageLayoutResult; foreach ($this->getHandles() as $handle) { $this->allHandles[$handle] = $this->handleProcessed; }