@@ -67,15 +67,15 @@ class CreateTest extends \PHPUnit\Framework\TestCase
67
67
/**
68
68
* @var \Magento\Framework\App\MaintenanceMode|\PHPUnit_Framework_MockObject_MockObject
69
69
*/
70
- private $ maintenanceMode ;
70
+ private $ maintenanceModeMock ;
71
71
72
72
/**
73
73
* @var \Magento\Framework\Backup\Factory|\PHPUnit_Framework_MockObject_MockObject
74
74
*/
75
75
private $ backupFactoryMock ;
76
76
77
77
/**
78
- * @var \Magento\Backup\Controller\Adminhtml\Index\Create|\PHPUnit_Framework_MockObject_MockObject
78
+ * @var \Magento\Backup\Controller\Adminhtml\Index\Create
79
79
*/
80
80
private $ createController ;
81
81
@@ -110,7 +110,7 @@ public function setUp()
110
110
->disableOriginalConstructor ()
111
111
->setMethods (['getExtensionByType ' , 'getBackupsDir ' ])
112
112
->getMock ();
113
- $ this ->maintenanceMode = $ this ->getMockBuilder (\Magento \Framework \App \MaintenanceMode::class)
113
+ $ this ->maintenanceModeMock = $ this ->getMockBuilder (\Magento \Framework \App \MaintenanceMode::class)
114
114
->disableOriginalConstructor ()
115
115
->setMethods (['set ' ])
116
116
->getMock ();
@@ -126,7 +126,7 @@ public function setUp()
126
126
'response ' => $ this ->responseMock ,
127
127
'session ' => $ this ->sessionMock ,
128
128
'helper ' => $ this ->dataBackendHelperMock ,
129
- 'maintenanceMode ' => $ this ->maintenanceMode ,
129
+ 'maintenanceMode ' => $ this ->maintenanceModeMock ,
130
130
]
131
131
);
132
132
$ this ->createController = $ this ->objectManager ->getObject (
@@ -154,10 +154,6 @@ public function testExecuteNotPost()
154
154
$ this ->requestMock ->expects ($ this ->any ())
155
155
->method ('isPost ' )
156
156
->willReturn (false );
157
- $ this ->requestMock ->expects ($ this ->any ())
158
- ->method ('getParam ' )
159
- ->with ('maintenance_mode ' )
160
- ->willReturn (true );
161
157
$ this ->dataBackendHelperMock ->expects ($ this ->any ())
162
158
->method ('getUrl ' )
163
159
->with ($ redirectUrl , [])
@@ -202,7 +198,7 @@ public function testExecutePermission()
202
198
->method ('representJson ' )
203
199
->with ($ response )
204
200
->willReturnSelf ();
205
- $ this ->maintenanceMode ->expects ($ this ->any ())
201
+ $ this ->maintenanceModeMock ->expects ($ this ->any ())
206
202
->method ('set ' )
207
203
->with (true )
208
204
->willReturn (false );
0 commit comments