@@ -74,17 +74,20 @@ protected function setUp()
74
74
public function testCheckOrderEmpty ()
75
75
{
76
76
$ this ->orderMock ->expects ($ this ->once ())
77
- ->method ('getId ' )
78
- ->will ($ this ->returnValue (null ));
79
- $ this ->assertEquals ($ this ->orderMock , $ this ->state ->check ($ this ->orderMock ));
77
+ ->method ('getBaseGrandTotal ' )
78
+ ->willReturn (100 );
79
+ $ this ->orderMock ->expects ($ this ->never ())
80
+ ->method ('setState ' );
81
+
82
+ $ this ->state ->check ($ this ->orderMock );
80
83
}
81
84
82
85
/**
83
86
* test check order - set state complete
84
87
*/
85
88
public function testCheckSetStateComplete ()
86
89
{
87
- $ this ->orderMock ->expects ($ this ->once ())
90
+ $ this ->orderMock ->expects ($ this ->any ())
88
91
->method ('getId ' )
89
92
->will ($ this ->returnValue (1 ));
90
93
$ this ->orderMock ->expects ($ this ->once ())
@@ -120,7 +123,7 @@ public function testCheckSetStateComplete()
120
123
*/
121
124
public function testCheckSetStateClosed ()
122
125
{
123
- $ this ->orderMock ->expects ($ this ->once ())
126
+ $ this ->orderMock ->expects ($ this ->any ())
124
127
->method ('getId ' )
125
128
->will ($ this ->returnValue (1 ));
126
129
$ this ->orderMock ->expects ($ this ->once ())
@@ -162,7 +165,7 @@ public function testCheckSetStateClosed()
162
165
*/
163
166
public function testCheckSetStateProcessing ()
164
167
{
165
- $ this ->orderMock ->expects ($ this ->once ())
168
+ $ this ->orderMock ->expects ($ this ->any ())
166
169
->method ('getId ' )
167
170
->will ($ this ->returnValue (1 ));
168
171
$ this ->orderMock ->expects ($ this ->once ())
0 commit comments