File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -417,7 +417,7 @@ protected function _formRateRequest($purpose): array
417
417
]
418
418
]
419
419
],
420
- 'rateRequestType ' => ['LIST ' ]
420
+ 'rateRequestType ' => ['LIST ' , ' ACCOUNT ' ]
421
421
]
422
422
];
423
423
Original file line number Diff line number Diff line change @@ -421,7 +421,17 @@ public function testCollectRatesRateAmountOriginBased(
421
421
$ rateResponse = $ this ->getRateResponse ($ amount , $ currencyCode , $ rateType );
422
422
423
423
$ this ->serializer ->method ('serialize ' )
424
- ->willReturn ('CollectRateString ' . $ amount );
424
+ ->willReturn (
425
+ json_encode (
426
+ [
427
+ 'accountNumber ' => '123456789 ' ,
428
+ 'requestedShipment ' =>
429
+ ['rateRequestTypes ' =>
430
+ ['LIST ' , 'ACCOUNT ' ]
431
+ ]
432
+ ]
433
+ ) .'CollectRateString ' . $ amount
434
+ );
425
435
426
436
$ rateCurrency = $ this ->getMockBuilder (Currency::class)
427
437
->disableOriginalConstructor ()
@@ -454,6 +464,7 @@ public function testCollectRatesRateAmountOriginBased(
454
464
->addMethods (['getBaseCurrency ' ])
455
465
->disableOriginalConstructor ()
456
466
->getMock ();
467
+
457
468
$ request ->method ('getBaseCurrency ' )
458
469
->willReturn ($ baseCurrency );
459
470
@@ -465,6 +476,7 @@ public function testCollectRatesRateAmountOriginBased(
465
476
->willReturnOnConsecutiveCalls ($ accessTokenResponse , $ rateResponse );
466
477
467
478
$ allRates1 = $ this ->carrier ->collectRates ($ request )->getAllRates ();
479
+
468
480
foreach ($ allRates1 as $ rate ) {
469
481
$ this ->assertEquals ($ expected , $ rate ->getData ('cost ' ));
470
482
}
You can’t perform that action at this time.
0 commit comments