This repository was archived by the owner on Apr 29, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
app/code/Magento/Shipping/Test/Unit/Model Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -309,30 +309,4 @@ public function loadByHashWithTrackIdDataProvider()
309
309
],
310
310
];
311
311
}
312
-
313
- public function testLoadByHashWithWrongCode ()
314
- {
315
- $ hash = base64_encode ('hash ' );
316
- $ decodedHash = [
317
- 'key ' => 'track_id ' ,
318
- 'id ' => 1 ,
319
- 'hash ' => 'protected_code ' ,
320
- ];
321
- $ this ->helper ->expects ($ this ->atLeastOnce ())
322
- ->method ('decodeTrackingHash ' )
323
- ->with ($ hash )
324
- ->willReturn ($ decodedHash );
325
- $ track = $ this ->getMockBuilder (\Magento \Sales \Model \Order \Shipment \Track::class)
326
- ->disableOriginalConstructor ()
327
- ->setMethods (['load ' , 'getId ' , 'getProtectCode ' ])
328
- ->getMock ();
329
- $ track ->expects ($ this ->atLeastOnce ())->method ('load ' )->with ($ decodedHash ['id ' ])->willReturnSelf ();
330
- $ track ->expects ($ this ->atLeastOnce ())->method ('getId ' )->willReturn ($ decodedHash ['id ' ]);
331
- $ track ->expects ($ this ->atLeastOnce ())->method ('getProtectCode ' )->willReturn ('0e123123123 ' );
332
-
333
- $ this ->trackFactory ->expects ($ this ->atLeastOnce ())->method ('create ' )->willReturn ($ track );
334
- $ this ->info ->loadByHash ($ hash );
335
-
336
- $ this ->assertEmpty ($ this ->info ->getTrackingInfo ());
337
- }
338
312
}
You can’t perform that action at this time.
0 commit comments