File tree Expand file tree Collapse file tree 3 files changed +28
-1
lines changed
Controller/Adminhtml/Order
dev/tests/integration/testsuite/Magento/Sales/Model/Order Expand file tree Collapse file tree 3 files changed +28
-1
lines changed Original file line number Diff line number Diff line change 10
10
11
11
/**
12
12
* Class AddComment
13
+ *
14
+ * Controller responsible for addition of the order comment to the order
13
15
*/
14
16
class AddComment extends \Magento \Sales \Controller \Adminhtml \Order implements HttpPostActionInterface
15
17
{
@@ -42,6 +44,7 @@ public function execute()
42
44
);
43
45
}
44
46
47
+ $ order ->setStatus ($ data ['status ' ]);
45
48
$ notify = $ data ['is_customer_notified ' ] ?? false ;
46
49
$ visible = $ data ['is_visible_on_front ' ] ?? false ;
47
50
Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ class Config
52
52
*/
53
53
protected $ maskStatusesMapping = [
54
54
\Magento \Framework \App \Area::AREA_FRONTEND => [
55
- \Magento \Sales \Model \Order::STATUS_FRAUD => \Magento \Sales \Model \Order::STATE_PROCESSING ,
55
+ \Magento \Sales \Model \Order::STATUS_FRAUD => \Magento \Sales \Model \Order::STATUS_FRAUD ,
56
56
\Magento \Sales \Model \Order::STATE_PAYMENT_REVIEW => \Magento \Sales \Model \Order::STATE_PROCESSING
57
57
]
58
58
];
Original file line number Diff line number Diff line change @@ -50,4 +50,28 @@ public function testCorrectCompleteStatusInStatesList()
50
50
51
51
$ this ->assertEquals ($ completeStatus ->getLabel (), $ completeState ->getText ());
52
52
}
53
+
54
+ /**
55
+ * Test Mask Status For Area
56
+ *
57
+ * @param string $code
58
+ * @param string $expected
59
+ * @dataProvider dataProviderForTestMaskStatusForArea
60
+ */
61
+ public function testMaskStatusForArea (string $ code , string $ expected )
62
+ {
63
+ $ result = $ this ->orderConfig ->getStatusFrontendLabel ($ code );
64
+ $ this ->assertEquals ($ expected , $ result );
65
+ }
66
+
67
+ /**
68
+ * @return array
69
+ */
70
+ public function dataProviderForTestMaskStatusForArea ()
71
+ {
72
+ return [
73
+ ['fraud ' , 'Suspected Fraud ' ],
74
+ ['processing ' , 'Processing ' ],
75
+ ];
76
+ }
53
77
}
You can’t perform that action at this time.
0 commit comments