File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Test/Unit/Model/Order/Status Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ public function getOrder()
142
142
*/
143
143
public function getStatusLabel ()
144
144
{
145
- if ($ this ->getOrder ()) {
145
+ if ($ this ->getOrder () && $ this -> getStatus () !== null ) {
146
146
return $ this ->getOrder ()->getConfig ()->getStatusLabel ($ this ->getStatus ());
147
147
}
148
148
return null ;
Original file line number Diff line number Diff line change @@ -83,6 +83,17 @@ public function testGetStatusLabel()
83
83
$ this ->assertEquals ($ status , $ this ->model ->getStatusLabel ());
84
84
}
85
85
86
+ /**
87
+ * @return void
88
+ */
89
+ public function testGetStatusLabelWithNullStatus ()
90
+ {
91
+ $ this ->model ->setOrder ($ this ->order );
92
+ $ this ->model ->setStatus (null );
93
+
94
+ $ this ->assertNull ($ this ->model ->getStatusLabel ());
95
+ }
96
+
86
97
public function testGetStoreFromStoreManager ()
87
98
{
88
99
$ resultStore = 1 ;
You can’t perform that action at this time.
0 commit comments