Skip to content

Commit 7f80265

Browse files
author
Dmytro Poperechnyy
committed
MAGETWO-43285: If you change page layout on grid, then the node of this page will be removed from hierarchy and Custom Theme will be changed to "Magento Luma"
1 parent 066e2c9 commit 7f80265

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

app/code/Magento/Cms/Test/Unit/Controller/Adminhtml/Page/InlineEditTest.php

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,11 @@ public function prepareMocksForTestExecute()
100100
->willReturn(true);
101101
$this->request->expects($this->at(0))
102102
->method('getParam')
103-
->with('items', [])
104-
->willReturn($postData);
103+
->willReturnMap(
104+
[
105+
['items', [], $postData]
106+
]
107+
);
105108
$this->pageRepository->expects($this->once())
106109
->method('getById')
107110
->with(1)
@@ -164,7 +167,7 @@ public function testExecuteWithLocalizedException()
164167
])
165168
->willReturnSelf();
166169

167-
$this->controller->execute();
170+
$this->assertSame($this->resultJson, $this->controller->execute());
168171
}
169172

170173
public function testExecuteWithRuntimeException()
@@ -185,7 +188,7 @@ public function testExecuteWithRuntimeException()
185188
])
186189
->willReturnSelf();
187190

188-
$this->controller->execute();
191+
$this->assertSame($this->resultJson, $this->controller->execute());
189192
}
190193

191194
public function testExecuteWithException()
@@ -206,7 +209,7 @@ public function testExecuteWithException()
206209
])
207210
->willReturnSelf();
208211

209-
$this->controller->execute();
212+
$this->assertSame($this->resultJson, $this->controller->execute());
210213
}
211214

212215
public function testExecuteWithoutData()
@@ -220,8 +223,11 @@ public function testExecuteWithoutData()
220223
->willReturn([]);
221224
$this->request->expects($this->at(1))
222225
->method('getParam')
223-
->with('isAjax', null)
224-
->willReturn(true);
226+
->willReturnMap(
227+
[
228+
['isAjax', null, true]
229+
]
230+
);
225231
$this->resultJson->expects($this->once())
226232
->method('setData')
227233
->with([
@@ -232,7 +238,7 @@ public function testExecuteWithoutData()
232238
])
233239
->willReturnSelf();
234240

235-
$this->controller->execute();
241+
$this->assertSame($this->resultJson, $this->controller->execute());
236242
}
237243

238244
public function testSetCmsPageData()

0 commit comments

Comments
 (0)