Skip to content

Commit 72006f8

Browse files
author
Yuri Kovsher
committed
MAGETWO-32559: Refactor Adminhtml/order directory
1 parent 147d917 commit 72006f8

File tree

1 file changed

+12
-4
lines changed
  • dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order

1 file changed

+12
-4
lines changed

dev/tests/unit/testsuite/Magento/Sales/Controller/Adminhtml/Order/EmailTest.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,13 @@ public function testEmail()
193193
->with('You sent the order email.');
194194
$this->resultRedirect->expects($this->once())
195195
->method('setPath')
196-
->with('sales/order/view', ['order_id' => $orderId]);
196+
->with('sales/order/view', ['order_id' => $orderId])
197+
->willReturnSelf();
197198

198-
$this->orderEmail->execute();
199+
$this->assertInstanceOf(
200+
'Magento\Backend\Model\View\Result\Redirect',
201+
$this->orderEmail->execute()
202+
);
199203
$this->assertEquals($this->response, $this->orderEmail->getResponse());
200204
}
201205

@@ -226,8 +230,12 @@ public function testEmailNoOrderId()
226230
->will($this->returnValue(true));
227231
$this->resultRedirect->expects($this->once())
228232
->method('setPath')
229-
->with('sales/*/');
233+
->with('sales/*/')
234+
->willReturnSelf();
230235

231-
$this->assertNull($this->orderEmail->execute());
236+
$this->assertInstanceOf(
237+
'Magento\Backend\Model\View\Result\Redirect',
238+
$this->orderEmail->execute()
239+
);
232240
}
233241
}

0 commit comments

Comments
 (0)