File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -193,9 +193,13 @@ public function testEmail()
193
193
->with ('You sent the order email. ' );
194
194
$ this ->resultRedirect ->expects ($ this ->once ())
195
195
->method ('setPath ' )
196
- ->with ('sales/order/view ' , ['order_id ' => $ orderId ]);
196
+ ->with ('sales/order/view ' , ['order_id ' => $ orderId ])
197
+ ->willReturnSelf ();
197
198
198
- $ this ->orderEmail ->execute ();
199
+ $ this ->assertInstanceOf (
200
+ 'Magento\Backend\Model\View\Result\Redirect ' ,
201
+ $ this ->orderEmail ->execute ()
202
+ );
199
203
$ this ->assertEquals ($ this ->response , $ this ->orderEmail ->getResponse ());
200
204
}
201
205
@@ -226,8 +230,12 @@ public function testEmailNoOrderId()
226
230
->will ($ this ->returnValue (true ));
227
231
$ this ->resultRedirect ->expects ($ this ->once ())
228
232
->method ('setPath ' )
229
- ->with ('sales/*/ ' );
233
+ ->with ('sales/*/ ' )
234
+ ->willReturnSelf ();
230
235
231
- $ this ->assertNull ($ this ->orderEmail ->execute ());
236
+ $ this ->assertInstanceOf (
237
+ 'Magento\Backend\Model\View\Result\Redirect ' ,
238
+ $ this ->orderEmail ->execute ()
239
+ );
232
240
}
233
241
}
You can’t perform that action at this time.
0 commit comments