Skip to content

Commit 2b70761

Browse files
fix tests and new methods names
1 parent 8ba2ba3 commit 2b70761

File tree

6 files changed

+43
-26
lines changed

6 files changed

+43
-26
lines changed

app/code/Magento/Usps/Helper/Data.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ class Data extends AbstractHelper
3636
'usps_INT_14', // First-Class Mail International Large Envelope
3737
'usps_INT_16', // Priority Mail International Small Flat Rate Box
3838
'usps_INT_20', // Priority Mail International Small Flat Rate Envelope
39-
'usps_9', // USPS Ground Adventage
39+
'1058', // Ground Advantage™
40+
'4058', // Ground Advantage™ HAZMAT
41+
'6058', // Ground Advantage™ Parcel locker
42+
'2058', // Ground Advantage™ Hold for pickup
43+
'4096', // Ground Advantage™ Cubic HAZMAT
44+
'1096', // Ground Advantage™ Cubic
45+
'2096', // Ground Advantage™ Cubic Hold for pickup
46+
'6096', // Ground Advantage™ Cubic Parcel locker
4047
];
4148

4249
/**

app/code/Magento/Usps/Model/Carrier.php

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -815,15 +815,14 @@ public function getCode($type, $code = '')
815815
'INT_24' => __('Priority Mail International DVD Flat Rate priced box'),
816816
'INT_25' => __('Priority Mail International Large Video Flat Rate priced box'),
817817
'INT_27' => __('Priority Mail Express International Padded Flat Rate Envelope'),
818-
'1058' => __('Ground Advantage #8482'),
819-
'2058' => __('Ground Advantage #8482 Hold for pickup'),
820-
'4058' => __('Ground Advantage #8482 HAZMAT'),
821-
'6058' => __('Ground Advantage #8482 Parcel locker'),
822-
'2058' => __('Ground Advantage #8482 Hold for pickup'),
823-
'4096' => __('Ground Advantage #8482 Cubic HAZMAT'),
824-
'1096' => __('Ground Advantage #8482 Cubic'),
825-
'2096' => __('Ground Advantage #8482 Cubic Hold for pickup'),
826-
'6096' => __('Ground Advantage #8482 Cubic Parcel locker')
818+
'1058' => __('Ground Advantage™'),
819+
'4058' => __('Ground Advantage™ HAZMAT'),
820+
'6058' => __('Ground Advantage™ Parcel locker'),
821+
'2058' => __('Ground Advantage™ Hold for pickup'),
822+
'4096' => __('Ground Advantage™ Cubic HAZMAT'),
823+
'1096' => __('Ground Advantage™ Cubic'),
824+
'2096' => __('Ground Advantage™ Cubic Hold for pickup'),
825+
'6096' => __('Ground Advantage™ Cubic Parcel locker')
827826
],
828827
'service_to_code' => [
829828
'0_FCLE' => 'First Class',
@@ -836,7 +835,6 @@ public function getCode($type, $code = '')
836835
'4' => 'Retail Ground',
837836
'6' => 'Media',
838837
'7' => 'Library',
839-
'9' => 'Ground Advantage',
840838
'13' => 'Priority Express',
841839
'15' => 'First Class',
842840
'16' => 'Priority',
@@ -901,6 +899,14 @@ public function getCode($type, $code = '')
901899
'INT_24' => 'Priority',
902900
'INT_25' => 'Priority',
903901
'INT_27' => 'Priority Express',
902+
'1058' => 'Ground Advantage',
903+
'4058' => 'Ground Advantage',
904+
'6058' => 'Ground Advantage',
905+
'2058' => 'Ground Advantage',
906+
'4096' => 'Ground Advantage',
907+
'1096' => 'Ground Advantage',
908+
'2096' => 'Ground Advantage',
909+
'6096' => 'Ground Advantage',
904910
],
905911
'method_to_code' => [
906912
'First-Class Mail Large Envelope' => '0_FCLE',

app/code/Magento/Usps/Test/Unit/Helper/DataTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public function shippingMethodDataProvider()
5858
['usps_3'], // Priority Mail Express
5959
['usps_4'], // Retail Ground
6060
['usps_6'], // Media Mail
61-
['usps_9'], // USPS Ground Advantage
6261
['usps_INT_1'], // Priority Mail Express International
6362
['usps_INT_2'], // Priority Mail International
6463
['usps_INT_4'], // Global Express Guaranteed (GXG)
@@ -71,6 +70,14 @@ public function shippingMethodDataProvider()
7170
['usps_INT_14'], // First-Class Mail International Large Envelope
7271
['usps_INT_16'], // Priority Mail International Small Flat Rate Box
7372
['usps_INT_20'], // Priority Mail International Small Flat Rate Envelope
73+
['1058'], // Ground Advantage™
74+
['4058'], // Ground Advantage™ HAZMAT
75+
['6058'], // Ground Advantage™ Parcel locker
76+
['2058'], // Ground Advantage™ Hold for pickup
77+
['4096'], // Ground Advantage™ Cubic HAZMAT
78+
['1096'], // Ground Advantage™ Cubic
79+
['2096'], // Ground Advantage™ Cubic Hold for pickup
80+
['6096'], // Ground Advantage™ Cubic Parcel locker
7481
];
7582
}
7683
}

app/code/Magento/Usps/Test/Unit/Model/CarrierTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ class CarrierTest extends TestCase
8888
* @var array
8989
*/
9090
private $config = [
91-
'carriers/usps/allowed_methods' => '0_FCLE,0_FCL,0_FCP,1,2,3,4,6,7,9,13,16,17,22,23,25,27,28,33,' .
91+
'carriers/usps/allowed_methods' => '0_FCLE,0_FCL,0_FCP,1,2,3,4,6,7,13,16,17,22,23,25,27,28,33,' .
9292
'34,35,36,37,42,43,53,55,56,57,61,INT_1,INT_2,INT_4,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,' .
93-
'INT_12,INT_13,INT_14,INT_15,INT_16,INT_20,INT_26,1058,2058,4058,6058,1058,2058,4058,4096,' .
93+
'INT_12,INT_13,INT_14,INT_15,INT_16,INT_20,INT_26,1058,4058,6058,2058,4096,' .
9494
'1096,2096,6096',
9595
'carriers/usps/showmethod' => 1,
9696
'carriers/usps/debug' => 1,

app/code/Magento/Usps/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<usps>
1212
<active>0</active>
1313
<sallowspecific>0</sallowspecific>
14-
<allowed_methods>0_FCLE,0_FCL,0_FCP,1,2,3,4,6,7,13,16,17,22,23,25,27,28,33,34,35,36,37,42,43,53,57,61,INT_1,INT_2,INT_4,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,INT_12,INT_13,INT_14,INT_15,INT_16,INT_20</allowed_methods>
14+
<allowed_methods>0_FCLE,0_FCL,0_FCP,1,2,3,4,6,7,13,16,17,22,23,25,27,28,33,34,35,36,37,42,43,53,57,61,INT_1,INT_2,INT_4,INT_6,INT_7,INT_8,INT_9,INT_10,INT_11,INT_12,INT_13,INT_14,INT_15,INT_16,INT_20,1058,4058,6058,2058,4096,1096,2096,6096</allowed_methods>
1515
<container>VARIABLE</container>
1616
<cutoff_cost />
1717
<free_method />

app/code/Magento/Usps/i18n/en_US.csv

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,14 @@
7272
"Priority Mail International DVD Flat Rate priced box","Priority Mail International DVD Flat Rate priced box"
7373
"Priority Mail International Large Video Flat Rate priced box","Priority Mail International Large Video Flat Rate priced box"
7474
"Priority Mail Express International Padded Flat Rate Envelope","Priority Mail Express International Padded Flat Rate Envelope"
75-
"Ground Advantage #8482","Ground Advantage #8482"
76-
"Ground Advantage #8482 Hold for pickup","Ground Advantage #8482 Hold for pickup"
77-
"Ground Advantage #8482 HAZMAT","Ground Advantage #8482 HAZMAT"
78-
"Ground Advantage #8482 Parcel locker","Ground Advantage #8482 Parcel locker"
79-
"Ground Advantage #8482","Ground Advantage #8482"
80-
"Ground Advantage #8482 Hold for pickup","Ground Advantage #8482 Hold for pickup"
81-
"Ground Advantage #8482 HAZMAT","Ground Advantage #8482 HAZMAT"
82-
"Ground Advantage #8482 Cubic HAZMAT","Ground Advantage #8482 Cubic HAZMAT"
83-
"Ground Advantage #8482 Cubic","Ground Advantage #8482 Cubic"
84-
"Ground Advantage #8482 Cubic Hold for pickup","Ground Advantage #8482 Cubic Hold for pickup"
85-
"Ground Advantage #8482 Cubic Parcel locker","Ground Advantage #8482 Cubic Parcel locker"
75+
"Ground Advantage™","Ground Advantage™"
76+
"Ground Advantage™ HAZMAT","Ground Advantage™ HAZMAT"
77+
"Ground Advantage™ Parcel locker","Ground Advantage™ Parcel locker"
78+
"Ground Advantage™ Hold for pickup","Ground Advantage™ Hold for pickup"
79+
"Ground Advantage™ Cubic HAZMAT","Ground Advantage™ Cubic HAZMAT"
80+
"Ground Advantage™ Cubic","Ground Advantage™ Cubic"
81+
"Ground Advantage™ Cubic Hold for pickup","Ground Advantage™ Cubic Hold for pickup"
82+
"Ground Advantage™ Cubic Parcel locker","Ground Advantage™ Cubic Parcel locker"
8683
Letter,Letter
8784
Flat,Flat
8885
Parcel,Parcel

0 commit comments

Comments
 (0)