@@ -87,7 +87,7 @@ protected function setUp()
87
87
$ this ->objectManager = new \Magento \Framework \TestFramework \Unit \Helper \ObjectManager ($ this );
88
88
89
89
$ this ->contextMock = $ this ->getMock (
90
- ' Magento\Backend\App\Action\Context ' ,
90
+ \ Magento \Backend \App \Action \Context::class ,
91
91
[
92
92
'getTitle ' ,
93
93
'getRequest ' ,
@@ -102,47 +102,47 @@ protected function setUp()
102
102
false
103
103
);
104
104
$ this ->resultRedirectFactoryMock = $ this ->getMock (
105
- ' Magento\Backend\Model\View\Result\RedirectFactory ' ,
105
+ \ Magento \Backend \Model \View \Result \RedirectFactory::class ,
106
106
['create ' ],
107
107
[],
108
108
'' ,
109
109
false
110
110
);
111
111
$ this ->resultRawFactoryMock = $ this ->getMock (
112
- ' Magento\Framework\Controller\Result\RawFactory ' ,
112
+ \ Magento \Framework \Controller \Result \RawFactory::class ,
113
113
[],
114
114
[],
115
115
'' ,
116
116
false
117
117
);
118
118
$ this ->resultJsonFactoryMock = $ this ->getMock (
119
- ' Magento\Framework\Controller\Result\JsonFactory ' ,
119
+ \ Magento \Framework \Controller \Result \JsonFactory::class ,
120
120
['create ' ],
121
121
[],
122
122
'' ,
123
123
false
124
124
);
125
125
$ this ->layoutFactoryMock = $ this ->getMock (
126
- ' Magento\Framework\View\LayoutFactory ' ,
126
+ \ Magento \Framework \View \LayoutFactory::class ,
127
127
['create ' ],
128
128
[],
129
129
'' ,
130
130
false
131
131
);
132
132
$ this ->requestMock = $ this ->getMockForAbstractClass (
133
- ' Magento\Framework\App\RequestInterface ' ,
133
+ \ Magento \Framework \App \RequestInterface::class ,
134
134
[],
135
135
'' ,
136
136
false ,
137
137
true ,
138
138
true ,
139
139
['getParam ' , 'getPost ' , 'getPostValue ' ]
140
140
);
141
- $ this ->objectManagerMock = $ this ->getMockBuilder (' Magento\Framework\ObjectManagerInterface ' )
141
+ $ this ->objectManagerMock = $ this ->getMockBuilder (\ Magento \Framework \ObjectManagerInterface::class )
142
142
->disableOriginalConstructor ()
143
143
->getMock ();
144
144
$ this ->eventManagerMock = $ this ->getMockForAbstractClass (
145
- ' Magento\Framework\Event\ManagerInterface ' ,
145
+ \ Magento \Framework \Event \ManagerInterface::class ,
146
146
[],
147
147
'' ,
148
148
false ,
@@ -151,13 +151,13 @@ protected function setUp()
151
151
['dispatch ' ]
152
152
);
153
153
$ this ->responseMock = $ this ->getMockForAbstractClass (
154
- ' Magento\Framework\App\ResponseInterface ' ,
154
+ \ Magento \Framework \App \ResponseInterface::class ,
155
155
[],
156
156
'' ,
157
157
false
158
158
);
159
159
$ this ->messageManagerMock = $ this ->getMockForAbstractClass (
160
- ' Magento\Framework\Message\ManagerInterface ' ,
160
+ \ Magento \Framework \Message \ManagerInterface::class ,
161
161
[],
162
162
'' ,
163
163
false ,
@@ -177,7 +177,7 @@ protected function setUp()
177
177
->willReturn ($ this ->resultRedirectFactoryMock );
178
178
179
179
$ this ->save = $ this ->objectManager ->getObject (
180
- ' Magento\Catalog\Controller\Adminhtml\Category\Save ' ,
180
+ \ Magento \Catalog \Controller \Adminhtml \Category \Save::class ,
181
181
[
182
182
'context ' => $ this ->contextMock ,
183
183
'resultRawFactory ' => $ this ->resultRawFactoryMock ,
@@ -212,7 +212,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
212
212
* |\PHPUnit_Framework_MockObject_MockObject $resultRedirectMock
213
213
*/
214
214
$ resultRedirectMock = $ this ->getMock (
215
- ' Magento\Backend\Model\View\Result\Redirect ' ,
215
+ \ Magento \Backend \Model \View \Result \Redirect::class ,
216
216
[],
217
217
[],
218
218
'' ,
@@ -223,7 +223,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
223
223
* |\PHPUnit_Framework_MockObject_MockObject $blockMock
224
224
*/
225
225
$ blockMock = $ this ->getMock (
226
- ' Magento\Framework\View\Element\Messages ' ,
226
+ \ Magento \Framework \View \Element \Messages::class ,
227
227
['setMessages ' , 'getGroupedHtml ' ],
228
228
[],
229
229
'' ,
@@ -234,7 +234,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
234
234
* |\PHPUnit_Framework_MockObject_MockObject $categoryMock
235
235
*/
236
236
$ categoryMock = $ this ->getMock (
237
- ' Magento\Catalog\Model\Category ' ,
237
+ \ Magento \Catalog \Model \Category::class ,
238
238
[
239
239
'setStoreId ' ,
240
240
'load ' ,
@@ -263,7 +263,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
263
263
* |\PHPUnit_Framework_MockObject_MockObject $parentCategoryMock
264
264
*/
265
265
$ parentCategoryMock = $ this ->getMock (
266
- ' Magento\Catalog\Model\Category ' ,
266
+ \ Magento \Catalog \Model \Category::class ,
267
267
[
268
268
'setStoreId ' ,
269
269
'load ' ,
@@ -287,7 +287,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
287
287
* |\PHPUnit_Framework_MockObject_MockObject $sessionMock
288
288
*/
289
289
$ sessionMock = $ this ->getMock (
290
- ' Magento\Backend\Model\Auth\Session ' ,
290
+ \ Magento \Backend \Model \Auth \Session::class ,
291
291
['setActiveTabId ' ],
292
292
[],
293
293
'' ,
@@ -298,7 +298,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
298
298
* |\PHPUnit_Framework_MockObject_MockObject $registryMock
299
299
*/
300
300
$ registryMock = $ this ->getMock (
301
- ' Magento\Framework\Registry ' ,
301
+ \ Magento \Framework \Registry::class ,
302
302
['register ' ],
303
303
[],
304
304
'' ,
@@ -309,7 +309,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
309
309
* |\PHPUnit_Framework_MockObject_MockObject $wysiwygConfigMock
310
310
*/
311
311
$ wysiwygConfigMock = $ this ->getMock (
312
- ' Magento\Cms\Model\Wysiwyg\Config ' ,
312
+ \ Magento \Cms \Model \Wysiwyg \Config::class ,
313
313
['setStoreId ' ],
314
314
[],
315
315
'' ,
@@ -320,7 +320,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
320
320
* |\PHPUnit_Framework_MockObject_MockObject $storeManagerMock
321
321
*/
322
322
$ storeManagerMock = $ this ->getMockForAbstractClass (
323
- ' Magento\Store\Model\StoreManagerInterface ' ,
323
+ \ Magento \Store \Model \StoreManagerInterface::class ,
324
324
[],
325
325
'' ,
326
326
false ,
@@ -333,7 +333,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
333
333
* |\PHPUnit_Framework_MockObject_MockObject $layoutMock
334
334
*/
335
335
$ layoutMock = $ this ->getMockForAbstractClass (
336
- ' Magento\Framework\View\Layout ' ,
336
+ \ Magento \Framework \View \Layout::class ,
337
337
[],
338
338
'' ,
339
339
false ,
@@ -346,7 +346,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
346
346
* |\PHPUnit_Framework_MockObject_MockObject $resultJsonMock
347
347
*/
348
348
$ resultJsonMock = $ this ->getMock (
349
- ' Magento\Cms\Model\Wysiwyg\Config ' ,
349
+ \ Magento \Cms \Model \Wysiwyg \Config::class ,
350
350
['setData ' ],
351
351
[],
352
352
'' ,
@@ -357,7 +357,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
357
357
* |\PHPUnit_Framework_MockObject_MockObject $messagesMock
358
358
*/
359
359
$ messagesMock = $ this ->getMock (
360
- ' Magento\Framework\Message\Collection ' ,
360
+ \ Magento \Framework \Message \Collection::class ,
361
361
[],
362
362
[],
363
363
'' ,
@@ -410,10 +410,10 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
410
410
->will (
411
411
$ this ->returnValueMap (
412
412
[
413
- [' Magento\Backend\Model\Auth\Session ' , $ sessionMock ],
414
- [' Magento\Framework\Registry ' , $ registryMock ],
415
- [' Magento\Cms\Model\Wysiwyg\Config ' , $ wysiwygConfigMock ],
416
- [' Magento\Store\Model\StoreManagerInterface ' , $ storeManagerMock ],
413
+ [\ Magento \Backend \Model \Auth \Session::class , $ sessionMock ],
414
+ [\ Magento \Framework \Registry::class , $ registryMock ],
415
+ [\ Magento \Cms \Model \Wysiwyg \Config::class , $ wysiwygConfigMock ],
416
+ [\ Magento \Store \Model \StoreManagerInterface::class , $ storeManagerMock ],
417
417
]
418
418
)
419
419
);
@@ -525,7 +525,7 @@ public function testExecute($categoryId, $storeId, $activeTabId, $parentId)
525
525
);
526
526
527
527
$ categoryResource = $ this ->getMock (
528
- ' Magento\Catalog\Model\ResourceModel\Category ' ,
528
+ \ Magento \Catalog \Model \ResourceModel \Category::class ,
529
529
[],
530
530
[],
531
531
'' ,
0 commit comments