@@ -16,34 +16,34 @@ class AjaxLoadTest extends \PHPUnit_Framework_TestCase
16
16
/**
17
17
* @var \Magento\Framework\App\Request\Http
18
18
*/
19
- private $ _request ;
19
+ private $ request ;
20
20
21
21
/**
22
22
* @var \Magento\Framework\App\Response\Http
23
23
*/
24
- private $ _resultFactory ;
24
+ private $ resultFactory ;
25
25
26
26
/**
27
27
* @var \Magento\Tax\Model\Calculation\RateRepository
28
28
*/
29
- private $ _taxRateRepository ;
29
+ private $ taxRateRepository ;
30
30
31
31
/*
32
32
* test setup
33
33
*/
34
34
public function setUp ()
35
35
{
36
- $ this ->_request = $ this ->getMockBuilder ('\Magento\Framework\App\Request\Http ' )
36
+ $ this ->request = $ this ->getMockBuilder ('\Magento\Framework\App\Request\Http ' )
37
37
->disableOriginalConstructor ()
38
38
->setMethods (['getParam ' ])
39
39
->getMock ();
40
40
41
- $ this ->_resultFactory = $ this ->getMockBuilder ('Magento\Framework\Controller\ResultFactory ' )
41
+ $ this ->resultFactory = $ this ->getMockBuilder ('Magento\Framework\Controller\ResultFactory ' )
42
42
->disableOriginalConstructor ()
43
43
->setMethods (['create ' ])
44
44
->getMock ();
45
45
46
- $ this ->_taxRateRepository = $ this ->getMockBuilder ('\Magento\Tax\Model\Calculation\RateRepository ' )
46
+ $ this ->taxRateRepository = $ this ->getMockBuilder ('\Magento\Tax\Model\Calculation\RateRepository ' )
47
47
->disableOriginalConstructor ()
48
48
->setMethods (['get ' ])
49
49
->getMock ();
@@ -86,11 +86,11 @@ public function testExecute()
86
86
]
87
87
);
88
88
89
- $ this ->_request ->expects ($ this ->any ())
89
+ $ this ->request ->expects ($ this ->any ())
90
90
->method ('getParam ' )
91
91
->will ($ this ->returnValue ($ taxRateId ));
92
92
93
- $ this ->_taxRateRepository ->expects ($ this ->any ())
93
+ $ this ->taxRateRepository ->expects ($ this ->any ())
94
94
->method ('get ' )
95
95
->with ($ taxRateId )
96
96
->will ($ this ->returnValue ($ rateMock ));
@@ -115,18 +115,18 @@ public function testExecute()
115
115
$ returnArray ,
116
116
]);
117
117
118
- $ this ->_resultFactory ->expects ($ this ->any ())
118
+ $ this ->resultFactory ->expects ($ this ->any ())
119
119
->method ('create ' )
120
120
->with (\Magento \Framework \Controller \ResultFactory::TYPE_JSON )
121
121
->willReturn ($ jsonObject );
122
122
123
123
$ notification = $ objectManager ->getObject (
124
124
'Magento\Tax\Controller\Adminhtml\Rate\AjaxLoad ' ,
125
125
[
126
- 'taxRateRepository ' => $ this ->_taxRateRepository ,
126
+ 'taxRateRepository ' => $ this ->taxRateRepository ,
127
127
'taxRateConverter ' => $ taxRateConverter ,
128
- 'request ' => $ this ->_request ,
129
- 'resultFactory ' => $ this ->_resultFactory ,
128
+ 'request ' => $ this ->request ,
129
+ 'resultFactory ' => $ this ->resultFactory ,
130
130
]
131
131
);
132
132
@@ -147,11 +147,11 @@ public function testExecuteLocalizedException()
147
147
148
148
$ objectManager = new ObjectManager ($ this );
149
149
150
- $ this ->_request ->expects ($ this ->any ())
150
+ $ this ->request ->expects ($ this ->any ())
151
151
->method ('getParam ' )
152
152
->will ($ this ->returnValue ($ taxRateId ));
153
153
154
- $ this ->_taxRateRepository ->expects ($ this ->any ())
154
+ $ this ->taxRateRepository ->expects ($ this ->any ())
155
155
->method ('get ' )
156
156
->with ($ taxRateId )
157
157
->willThrowException ($ noSuchEntityEx );
@@ -168,17 +168,17 @@ public function testExecuteLocalizedException()
168
168
'error_message ' => $ exceptionMessage ,
169
169
]);
170
170
171
- $ this ->_resultFactory ->expects ($ this ->any ())
171
+ $ this ->resultFactory ->expects ($ this ->any ())
172
172
->method ('create ' )
173
173
->with (\Magento \Framework \Controller \ResultFactory::TYPE_JSON )
174
174
->willReturn ($ jsonObject );
175
175
176
176
$ notification = $ objectManager ->getObject (
177
177
'Magento\Tax\Controller\Adminhtml\Rate\AjaxLoad ' ,
178
178
[
179
- 'taxRateRepository ' => $ this ->_taxRateRepository ,
180
- 'request ' => $ this ->_request ,
181
- 'resultFactory ' => $ this ->_resultFactory ,
179
+ 'taxRateRepository ' => $ this ->taxRateRepository ,
180
+ 'request ' => $ this ->request ,
181
+ 'resultFactory ' => $ this ->resultFactory ,
182
182
]
183
183
);
184
184
@@ -197,11 +197,11 @@ public function testExecuteException()
197
197
198
198
$ objectManager = new ObjectManager ($ this );
199
199
200
- $ this ->_request ->expects ($ this ->any ())
200
+ $ this ->request ->expects ($ this ->any ())
201
201
->method ('getParam ' )
202
202
->will ($ this ->returnValue ($ taxRateId ));
203
203
204
- $ this ->_taxRateRepository ->expects ($ this ->any ())
204
+ $ this ->taxRateRepository ->expects ($ this ->any ())
205
205
->method ('get ' )
206
206
->with ($ taxRateId )
207
207
->willThrowException ($ noSuchEntityEx );
@@ -218,17 +218,17 @@ public function testExecuteException()
218
218
'error_message ' => $ exceptionMessage ,
219
219
]);
220
220
221
- $ this ->_resultFactory ->expects ($ this ->any ())
221
+ $ this ->resultFactory ->expects ($ this ->any ())
222
222
->method ('create ' )
223
223
->with (\Magento \Framework \Controller \ResultFactory::TYPE_JSON )
224
224
->willReturn ($ jsonObject );
225
225
226
226
$ notification = $ objectManager ->getObject (
227
227
'Magento\Tax\Controller\Adminhtml\Rate\AjaxLoad ' ,
228
228
[
229
- 'taxRateRepository ' => $ this ->_taxRateRepository ,
230
- 'request ' => $ this ->_request ,
231
- 'resultFactory ' => $ this ->_resultFactory ,
229
+ 'taxRateRepository ' => $ this ->taxRateRepository ,
230
+ 'request ' => $ this ->request ,
231
+ 'resultFactory ' => $ this ->resultFactory ,
232
232
]
233
233
);
234
234
0 commit comments