File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
app/code/Magento/Sales/Test/Unit/Model/ResourceModel/Order/Shipment Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,8 @@ protected function setUp()
89
89
*/
90
90
public function testSave ()
91
91
{
92
+ $ shipmentMock = $ this ->createMock (\Magento \Sales \Model \Order \Shipment::class);
93
+ $ orderMock = $ this ->createMock (\Magento \Sales \Model \Order::class);
92
94
$ this ->entitySnapshotMock ->expects ($ this ->once ())
93
95
->method ('isModified ' )
94
96
->with ($ this ->trackModelMock )
@@ -98,6 +100,8 @@ public function testSave()
98
100
->with ($ this ->equalTo ($ this ->trackModelMock ))
99
101
->will ($ this ->returnValue ([]));
100
102
$ this ->trackModelMock ->expects ($ this ->any ())->method ('getData ' )->willReturn ([]);
103
+ $ this ->trackModelMock ->expects ($ this ->atLeastOnce ())->method ('getShipment ' )->willReturn ($ shipmentMock );
104
+ $ shipmentMock ->expects ($ this ->atLeastOnce ())->method ('getOrder ' )->willReturn ($ orderMock );
101
105
$ this ->trackResource ->save ($ this ->trackModelMock );
102
106
$ this ->assertTrue (true );
103
107
}
You can’t perform that action at this time.
0 commit comments