File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Controller/AbstractController
Test/Unit/Controller/Guest Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 16
16
17
17
/**
18
18
* Abstract class for controllers Reorder(Customer) and Reorder(Guest)
19
- *
20
- * Class Magento\Sales\Controller\AbstractController\Reorder
21
19
*/
22
20
abstract class Reorder extends Action \Action implements HttpPostActionInterface
23
21
{
Original file line number Diff line number Diff line change @@ -113,17 +113,23 @@ protected function setUp()
113
113
*/
114
114
public function testExecuteWithReorderIsNotAllowed ()
115
115
{
116
+ $ orderMock = $ this ->createMock (Order::class);
117
+ $ orderMock ->method ('getId ' )->willReturn (self ::STUB_ORDER_ID );
118
+
116
119
$ this ->orderLoaderMock ->method ('load ' )
117
120
->with ($ this ->requestMock )
118
121
->willReturn ($ this ->resultRedirectFactoryMock );
119
- $ orderMock = $ this ->createMock (Order::class);
120
- $ orderMock ->method ('getId ' )->willReturn (self ::STUB_ORDER_ID );
122
+
121
123
$ this ->registryMock ->expects ($ this ->once ())->method ('registry ' )
122
124
->with ('current_order ' )
123
125
->willReturn ($ orderMock );
124
126
127
+ $ this ->reorderHelperMock ->method ('canReorder ' )->with (self ::STUB_ORDER_ID )
128
+ ->willReturn (false );
129
+
125
130
$ resultRedirectMock = $ this ->createMock (Redirect::class);
126
131
$ this ->resultRedirectFactoryMock ->expects ($ this ->once ())->method ('create ' )->willReturn ($ resultRedirectMock );
132
+
127
133
$ this ->reorderHelperMock ->method ('canReorder ' )->with (self ::STUB_ORDER_ID )
128
134
->willReturn (false );
129
135
You can’t perform that action at this time.
0 commit comments