Skip to content

Commit fcef6ee

Browse files
author
Bohdan Korablov
committed
MAGETWO-69983: Bugfixes delivery
1 parent 80ace5c commit fcef6ee

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

app/code/Magento/Config/Test/Unit/Model/Config/ImporterTest.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ protected function setUp()
125125
);
126126
}
127127

128+
/**
129+
* @SuppressWarnings(PHPMD.UnusedLocalVariable)
130+
*/
128131
public function testImport()
129132
{
130133
$data = [];
@@ -145,8 +148,17 @@ public function testImport()
145148
->willReturn('oldScope');
146149
$this->stateMock->expects($this->once())
147150
->method('emulateAreaCode')
148-
->with(Area::AREA_ADMINHTML, $this->anything());
149-
$this->scopeMock->expects($this->once())
151+
->with(Area::AREA_ADMINHTML, $this->anything())
152+
->willReturnCallback(function ($area, $function) {
153+
return $function();
154+
});
155+
$this->saveProcessorMock->expects($this->once())
156+
->method('process')
157+
->with([]);
158+
$this->scopeMock->expects($this->at(1))
159+
->method('setCurrentScope')
160+
->with(Area::AREA_ADMINHTML);
161+
$this->scopeMock->expects($this->at(2))
150162
->method('setCurrentScope')
151163
->with('oldScope');
152164
$this->flagManagerMock->expects($this->once())

0 commit comments

Comments
 (0)