Skip to content

Commit 2cf95b4

Browse files
authored
ENGCOM-7252: Removed references to '%context%' (dead code) #26900
2 parents a296ead + 30f02cc commit 2cf95b4

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

lib/internal/Magento/Framework/RequireJs/Config.php

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -155,22 +155,15 @@ public function getConfig()
155155
{
156156
$distributedConfig = '';
157157
$customConfigFiles = $this->fileSource->getFiles($this->design->getDesignTheme(), self::CONFIG_FILE_NAME);
158+
158159
foreach ($customConfigFiles as $file) {
159160
/** @var $fileReader \Magento\Framework\Filesystem\File\Read */
160161
$fileReader = $this->readFactory->create($file->getFilename(), DriverPool::FILE);
161162
$config = $fileReader->readAll($file->getName());
162-
$distributedConfig .= str_replace(
163-
['%config%', '%context%'],
164-
[$config, $file->getModule()],
165-
self::PARTIAL_CONFIG_TEMPLATE
166-
);
163+
$distributedConfig .= str_replace('%config%', $config, self::PARTIAL_CONFIG_TEMPLATE);
167164
}
168165

169-
$fullConfig = str_replace(
170-
['%function%', '%usages%'],
171-
[$distributedConfig],
172-
self::FULL_CONFIG_TEMPLATE
173-
);
166+
$fullConfig = str_replace(['%function%', '%usages%'], [$distributedConfig], self::FULL_CONFIG_TEMPLATE);
174167

175168
if ($this->minification->isEnabled('js')) {
176169
$fullConfig = $this->minifyAdapter->minify($fullConfig);

lib/internal/Magento/Framework/RequireJs/Test/Unit/ConfigTest.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,6 @@ function ($file) {
115115
$fileOne->expects($this->once())
116116
->method('getName')
117117
->will($this->returnValue('file_one.js'));
118-
$fileOne->expects($this->once())
119-
->method('getModule')
120-
->will($this->returnValue('Module_One'));
121118
$fileTwo = $this->createMock(\Magento\Framework\View\File::class);
122119
$fileTwo->expects($this->once())
123120
->method('getFilename')

0 commit comments

Comments
 (0)