@@ -447,4 +447,67 @@ public function requestToShipmentDataProvider()
447
447
]
448
448
];
449
449
}
450
+
451
+ /**
452
+ * @dataProvider dhlProductsDataProvider
453
+ *
454
+ * @param string $docType
455
+ * @param array $products
456
+ */
457
+ public function testGetDhlProducts (string $ docType , array $ products )
458
+ {
459
+ $ this ->assertEquals ($ products , $ this ->model ->getDhlProducts ($ docType ));
460
+ }
461
+
462
+ /**
463
+ * @return array
464
+ */
465
+ public function dhlProductsDataProvider () : array
466
+ {
467
+ return [
468
+ 'doc ' => [
469
+ 'docType ' => \Magento \Dhl \Model \Carrier::DHL_CONTENT_TYPE_DOC ,
470
+ 'products ' => [
471
+ '2 ' => 'Easy shop ' ,
472
+ '5 ' => 'Sprintline ' ,
473
+ '6 ' => 'Secureline ' ,
474
+ '7 ' => 'Express easy ' ,
475
+ '9 ' => 'Europack ' ,
476
+ 'B ' => 'Break bulk express ' ,
477
+ 'C ' => 'Medical express ' ,
478
+ 'D ' => 'Express worldwide ' ,
479
+ 'U ' => 'Express worldwide ' ,
480
+ 'K ' => 'Express 9:00 ' ,
481
+ 'L ' => 'Express 10:30 ' ,
482
+ 'G ' => 'Domestic economy select ' ,
483
+ 'W ' => 'Economy select ' ,
484
+ 'I ' => 'Domestic express 9:00 ' ,
485
+ 'N ' => 'Domestic express ' ,
486
+ 'O ' => 'Others ' ,
487
+ 'R ' => 'Globalmail business ' ,
488
+ 'S ' => 'Same day ' ,
489
+ 'T ' => 'Express 12:00 ' ,
490
+ 'X ' => 'Express envelope ' ,
491
+ ]
492
+ ],
493
+ 'non-doc ' => [
494
+ 'docType ' => \Magento \Dhl \Model \Carrier::DHL_CONTENT_TYPE_NON_DOC ,
495
+ 'products ' => [
496
+ '1 ' => 'Domestic express 12:00 ' ,
497
+ '3 ' => 'Easy shop ' ,
498
+ '4 ' => 'Jetline ' ,
499
+ '8 ' => 'Express easy ' ,
500
+ 'P ' => 'Express worldwide ' ,
501
+ 'Q ' => 'Medical express ' ,
502
+ 'E ' => 'Express 9:00 ' ,
503
+ 'F ' => 'Freight worldwide ' ,
504
+ 'H ' => 'Economy select ' ,
505
+ 'J ' => 'Jumbo box ' ,
506
+ 'M ' => 'Express 10:30 ' ,
507
+ 'V ' => 'Europack ' ,
508
+ 'Y ' => 'Express 12:00 ' ,
509
+ ]
510
+ ]
511
+ ];
512
+ }
450
513
}
0 commit comments