diff --git a/lib/internal/Magento/Framework/View/File/Collector/Base.php b/lib/internal/Magento/Framework/View/File/Collector/Base.php index a5824b7321e84..f82ba6b0d7fab 100644 --- a/lib/internal/Magento/Framework/View/File/Collector/Base.php +++ b/lib/internal/Magento/Framework/View/File/Collector/Base.php @@ -65,7 +65,7 @@ public function getFiles(ThemeInterface $theme, $filePath) foreach ($sharedFiles as $file) { $result[] = $this->fileFactory->create($file->getFullPath(), $file->getComponentName(), null, true); } - $area = $theme->getData('area'); + $area = $theme->getArea(); $themeFiles = $this->componentDirSearch->collectFilesWithContext( ComponentRegistrar::MODULE, "view/{$area}/{$this->subDir}{$filePath}" diff --git a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/BaseTest.php b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/BaseTest.php index 0edafcb125dd3..ea0ef1cc69e87 100644 --- a/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/BaseTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/File/Collector/BaseTest.php @@ -85,8 +85,7 @@ public function testGetFiles() ->method('create') ->willReturn($this->createFileMock()); $this->themeMock->expects($this->once()) - ->method('getData') - ->with('area') + ->method('getArea') ->willReturn('frontend'); $result = $this->fileCollector->getFiles($this->themeMock, '*.xml');