Skip to content

Commit d641a93

Browse files
author
Oleksii Korshenko
committed
#10673: [2.2.0-RC2.2] Static content deploy with multiple locales: js-translation.json files are the same
- fixed unit tests
1 parent f4afad2 commit d641a93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/code/Magento/Translation/Test/Unit/Model/Json/PreProcessorTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ public function testGetData()
8080
$context->expects($this->once())
8181
->method('getAreaCode')
8282
->willReturn($areaCode);
83+
$context->expects($this->once())
84+
->method('getLocale')
85+
->willReturn('en_US');
8386

8487
$this->areaListMock->expects($this->once())
8588
->method('getArea')
@@ -97,6 +100,9 @@ public function testGetData()
97100
->method('setContentType')
98101
->with('json');
99102

103+
$this->translateMock->expects($this->once())->method('setLocale')->with('en_US')->willReturnSelf();
104+
$this->translateMock->expects($this->once())->method('loadData')->with($areaCode, true);
105+
100106
$this->model->process($chain);
101107
}
102108
}

0 commit comments

Comments
 (0)