@@ -60,7 +60,7 @@ class RenderTest extends \PHPUnit\Framework\TestCase
60
60
private $ helperMock ;
61
61
62
62
/**
63
- * @var \Magento\Framework\View\Element\UiComponent\ ContextInterface|\PHPUnit_Framework_MockObject_MockObject
63
+ * @var ContextInterface|\PHPUnit_Framework_MockObject_MockObject
64
64
*/
65
65
private $ uiComponentContextMock ;
66
66
@@ -106,7 +106,7 @@ protected function setUp()
106
106
->disableOriginalConstructor ()
107
107
->getMock ();
108
108
$ this ->uiComponentContextMock = $ this ->getMockForAbstractClass (
109
- \ Magento \ Framework \ View \ Element \ UiComponent \ ContextInterface::class
109
+ ContextInterface::class
110
110
);
111
111
$ this ->dataProviderMock = $ this ->getMockForAbstractClass (
112
112
\Magento \Framework \View \Element \UiComponent \DataProvider \DataProviderInterface::class
@@ -174,13 +174,15 @@ public function testExecuteAjaxRequest()
174
174
$ this ->uiComponentMock ->expects ($ this ->once ())
175
175
->method ('getChildComponents ' )
176
176
->willReturn ([]);
177
- $ this ->uiComponentMock ->expects ($ this ->once ())
177
+ $ this ->uiComponentMock ->expects ($ this ->any ())
178
178
->method ('getContext ' )
179
179
->willReturn ($ this ->uiComponentContextMock );
180
180
$ this ->uiFactoryMock ->expects ($ this ->once ())
181
181
->method ('create ' )
182
182
->willReturn ($ this ->uiComponentMock );
183
- $ this ->uiComponentTypeResolverMock ->expects ($ this ->once ())->method ('resolve ' )->with ($ contextMock )
183
+ $ this ->uiComponentTypeResolverMock ->expects ($ this ->once ())
184
+ ->method ('resolve ' )
185
+ ->with ($ this ->uiComponentContextMock )
184
186
->willReturn ('application/json ' );
185
187
$ this ->responseMock ->expects ($ this ->once ())->method ('setHeader ' )
186
188
->with ('Content-Type ' , 'application/json ' , true );
@@ -225,7 +227,7 @@ public function testExecuteAjaxRequestWithoutPermissions(array $dataProviderConf
225
227
$ this ->uiComponentMock ->expects ($ this ->any ())
226
228
->method ('getChildComponents ' )
227
229
->willReturn ([]);
228
- $ this ->uiComponentMock ->expects ($ this ->once ())
230
+ $ this ->uiComponentMock ->expects ($ this ->any ())
229
231
->method ('getContext ' )
230
232
->willReturn ($ this ->uiComponentContextMock );
231
233
$ this ->uiFactoryMock ->expects ($ this ->once ())
0 commit comments