Skip to content

Commit efc52ed

Browse files
ENGCOM-8130: AppState emulateAreaCode was not respected by file collector #28917
2 parents 996177c + b3b7707 commit efc52ed

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/internal/Magento/Framework/View/File/Collector/Base.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getFiles(ThemeInterface $theme, $filePath)
6565
foreach ($sharedFiles as $file) {
6666
$result[] = $this->fileFactory->create($file->getFullPath(), $file->getComponentName(), null, true);
6767
}
68-
$area = $theme->getData('area');
68+
$area = $theme->getArea();
6969
$themeFiles = $this->componentDirSearch->collectFilesWithContext(
7070
ComponentRegistrar::MODULE,
7171
"view/{$area}/{$this->subDir}{$filePath}"

lib/internal/Magento/Framework/View/Test/Unit/File/Collector/BaseTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,7 @@ public function testGetFiles()
8585
->method('create')
8686
->willReturn($this->createFileMock());
8787
$this->themeMock->expects($this->once())
88-
->method('getData')
89-
->with('area')
88+
->method('getArea')
9089
->willReturn('frontend');
9190

9291
$result = $this->fileCollector->getFiles($this->themeMock, '*.xml');

0 commit comments

Comments
 (0)