Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 8f706e8

Browse files
committed
MAGETWO-81493: Tracking Info Enumeration with Weak Protect Code check
1 parent 6829464 commit 8f706e8

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

app/code/Magento/Shipping/Test/Unit/Model/InfoTest.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -309,30 +309,4 @@ public function loadByHashWithTrackIdDataProvider()
309309
],
310310
];
311311
}
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-
}
338312
}

0 commit comments

Comments
 (0)