Skip to content

Commit b3b7707

Browse files
ENGCOM-8130: AppState emulateAreaCode was not respected by file collector #28917
- Merge Pull Request #28917 from johan-lindahl/magento2:bugfix-emulate-area-code - Merged commits: 1. 0ec2c91 2. f35a8b6 3. e724788 4. 27767f1
2 parents 32ed03c + 27767f1 commit b3b7707

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)